fix: error when fetching info while switching plugins

This commit is contained in:
yessenia
2025-10-11 15:00:35 +08:00
parent ee89e9eb2f
commit 33d7b48e49
3 changed files with 8 additions and 15 deletions

View File

@ -5,12 +5,12 @@ type SimpleDetail = Pick<PluginDetail, 'plugin_id' | 'declaration'> & { provider
type Shape = {
detail: SimpleDetail | undefined
setDetail: (detail: SimpleDetail) => void
setDetail: (detail?: SimpleDetail) => void
}
export const usePluginStore = create<Shape>(set => ({
detail: undefined,
setDetail: (detail: SimpleDetail) => set({ detail }),
setDetail: (detail?: SimpleDetail) => set({ detail }),
}))
type ShapeSubscription = {