diff --git a/src/client/initialize.ts b/src/client/initialize.ts index 3e3eace..6fc2ac1 100644 --- a/src/client/initialize.ts +++ b/src/client/initialize.ts @@ -62,10 +62,8 @@ export function initialize(): PluginInstance { on('wb:plugin:action-effect:invoke', (id: string) => { const effect = registeredEffects[id]; - if (!effect) { - console.warn('No effect found.'); - } - effect(); + if (effect) effect(); + else console.warn('No effect found.'); }); function on(event: string, listener: Function) {