Skip to content

Commit 6cf77a9

Browse files
[Manager] Fix bug: installed packs metadata not re-fetched after installations (#4254)
1 parent 886e490 commit 6cf77a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/composables/nodePack/useInstalledPacks.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { whenever } from '@vueuse/core'
12
import { computed, onUnmounted } from 'vue'
23

34
import { useNodePacks } from '@/composables/nodePack/useNodePacks'
@@ -23,6 +24,11 @@ export const useInstalledPacks = (options: UseNodePacksOptions = {}) => {
2324
await startFetch()
2425
}
2526

27+
// When installedPackIds changes, we need to update the nodePacks
28+
whenever(installedPackIds, async () => {
29+
await startFetch()
30+
})
31+
2632
onUnmounted(() => {
2733
cleanup()
2834
})

0 commit comments

Comments
 (0)