Skip to content

Commit

Permalink
fix: fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
nyqykk committed Jul 15, 2024
1 parent 99861bc commit 6ace210
Show file tree
Hide file tree
Showing 2 changed files with 5,465 additions and 6,119 deletions.
8 changes: 5 additions & 3 deletions packages/hooks/src/pluginSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ export class PluginSystem<T extends Record<string, any>> {
const plugin = this.registerPlugins[pluginName];
assert(plugin, `plugin "${pluginName}" is not registered.`);

for (const key in plugin) {
if (key !== 'name') continue;
this.lifecycle[key].remove(plugin[key as string]);
for (const key in this.lifecycle) {
const pluginLife = plugin[key as string];
if (pluginLife) {
this.lifecycle[key].remove(pluginLife);
}
}
}

Expand Down
Loading

0 comments on commit 6ace210

Please sign in to comment.