Skip to content

[WEB-1134] fix: module link create and delete mutation #4373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: code refactor
  • Loading branch information
anmolsinghbhatia committed May 6, 2024
commit a280930874d5ea62f48e4bd9e9457d588b89cf01
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