diff --git a/packages/core/src/garfish.ts b/packages/core/src/garfish.ts index a465fbf17..9ad70987d 100644 --- a/packages/core/src/garfish.ts +++ b/packages/core/src/garfish.ts @@ -95,6 +95,10 @@ export class Garfish extends EventEmitter2 { return this; } + removePlugin(pluginName: string) { + this.hooks.removePlugin(pluginName); + } + run(options: interfaces.Options = {}) { if (this.running) { if (__DEV__) { diff --git a/packages/hooks/src/pluginSystem.ts b/packages/hooks/src/pluginSystem.ts index 36b63b617..598e13ed1 100644 --- a/packages/hooks/src/pluginSystem.ts +++ b/packages/hooks/src/pluginSystem.ts @@ -44,7 +44,7 @@ export class PluginSystem> { assert(plugin, `plugin "${pluginName}" is not registered.`); for (const key in plugin) { - if (key === 'name') continue; + if (key !== 'name') continue; this.lifecycle[key].remove(plugin[key as string]); } }