Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alison Lai committed Jul 24, 2024
1 parent 0d46b97 commit 3de7549
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/client/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,8 @@ export function initialize<T = {}>(): PluginInstance<T> {

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) {
Expand Down

0 comments on commit 3de7549

Please sign in to comment.