diff --git a/src/composables/nodePack/useInstalledPacks.ts b/src/composables/nodePack/useInstalledPacks.ts index eb51bdf8d..fd671d33b 100644 --- a/src/composables/nodePack/useInstalledPacks.ts +++ b/src/composables/nodePack/useInstalledPacks.ts @@ -1,3 +1,4 @@ +import { whenever } from '@vueuse/core' import { computed, onUnmounted } from 'vue' import { useNodePacks } from '@/composables/nodePack/useNodePacks' @@ -23,6 +24,11 @@ export const useInstalledPacks = (options: UseNodePacksOptions = {}) => { await startFetch() } + // When installedPackIds changes, we need to update the nodePacks + whenever(installedPackIds, async () => { + await startFetch() + }) + onUnmounted(() => { cleanup() })