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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user