From 11c52cb1f96bfb76278596bff7fea907ddf62dd0 Mon Sep 17 00:00:00 2001 From: Viren070 Date: Thu, 14 Aug 2025 23:37:19 +0100 Subject: [PATCH] feat: assign unassigned addons to the first group in StreamFetcher --- packages/core/src/streams/fetcher.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/core/src/streams/fetcher.ts b/packages/core/src/streams/fetcher.ts index 8841b640..742c415d 100644 --- a/packages/core/src/streams/fetcher.ts +++ b/packages/core/src/streams/fetcher.ts @@ -163,6 +163,18 @@ class StreamFetcher { this.userData.groups.length > 0 && this.userData.disableGroups !== true ) { + // add addons that are not assigned to any group to the first group + const unassignedAddons = addons.filter( + (addon) => + !this.userData.groups!.some((group) => + group.addons.includes(addon.preset.id) + ) + ); + if (unassignedAddons.length > 0) { + this.userData.groups[0].addons.push( + ...unassignedAddons.map((addon) => addon.preset.id) + ); + } const groupPromises = this.userData.groups.map((group) => { const groupAddons = addons.filter( (addon) => addon.preset.id && group.addons.includes(addon.preset.id)