Skip to content

Commit

Permalink
chore: code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolsinghbhatia committed May 6, 2024
1 parent 18931a9 commit a280930
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/store/module.store.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import concat from "lodash/concat";
import set from "lodash/set";
import sortBy from "lodash/sortBy";
import update from "lodash/update";
Expand Down Expand Up @@ -381,7 +382,7 @@ export class ModulesStore implements IModuleStore {
try {
const moduleLink = await this.moduleService.createModuleLink(workspaceSlug, projectId, moduleId, data);
runInAction(() => {
update(this.moduleMap, [moduleId, "link_module"], (moduleLinks = []) => [...moduleLinks, moduleLink]);
update(this.moduleMap, [moduleId, "link_module"], (moduleLinks = []) => concat(moduleLinks, moduleLink));
});
return moduleLink;
} catch (error) {
Expand Down

0 comments on commit a280930

Please sign in to comment.