fix(hooks): always persist plugin hook config state, even when empty

When all plugin hooks are removed (user disables/uninstalls plugins),
hooksConfigs becomes an empty array. The previous guard
(hooksConfigs.length > 0) skipped setPluginHooksConfigs(), leaving
stale plugin hooks active in pendingPluginHooksConfigs. Now we always
call setPluginHooksConfigs() so empty configs properly clear the
pending state and invalidate the cache.
This commit is contained in:
JacobZyy
2026-05-19 14:15:42 +08:00
parent 4d105d0559
commit 5e20842262
+2 -2
View File
@@ -12,7 +12,7 @@ export function applyHookConfig(params: {
count: pluginComponents.hooksConfigs.length,
plugins: pluginComponents.plugins.map(p => p.name),
})
setPluginHooksConfigs(pluginComponents.hooksConfigs)
}
setPluginHooksConfigs(pluginComponents.hooksConfigs)
}