From 080ba48adf930aa17cd33a032039e4cef29ef0c2 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 1 Aug 2022 13:21:45 +0100 Subject: [PATCH] Prevent adding the same group to an app multiple times --- .../portal/overview/_components/AssignmentModal.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte b/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte index 2f0688097d..d67697e9b1 100644 --- a/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte +++ b/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte @@ -39,9 +39,9 @@ } } - $: filteredGroups = $groups.filter(element => { - return !element.apps.find(y => { - return y.appId === app.appId + $: filteredGroups = $groups.filter(group => { + return !group.apps.find(appId => { + return appId === app.appId }) })