From d4c2b4db101bcdb11bdad0173f476c6088017fad Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia Date: Wed, 21 Feb 2024 15:34:27 +0530 Subject: [PATCH] chore: module select handle logic updated --- web/components/issues/issue-detail/module-select.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/components/issues/issue-detail/module-select.tsx b/web/components/issues/issue-detail/module-select.tsx index 229ee7b87..9de94d2dd 100644 --- a/web/components/issues/issue-detail/module-select.tsx +++ b/web/components/issues/issue-detail/module-select.tsx @@ -36,8 +36,8 @@ export const IssueModuleSelect: React.FC = observer((props) const handleIssueModuleChange = async (moduleIds: string[]) => { if (!issue || !issue.module_ids) return; setIsUpdating(true); - const updatedModuleId = xor(issue.module_ids, moduleIds)[0]; - if (updatedModuleId !== undefined) { + const updatedModuleIds = xor(issue.module_ids, moduleIds); + for (const updatedModuleId of updatedModuleIds) { if (issue.module_ids.includes(updatedModuleId)) { await issueOperations.removeModulesFromIssue?.(workspaceSlug, projectId, issueId, [updatedModuleId]); } else {