Skip to content

Commit

Permalink
Merge pull request #104 from dpzxsm/master
Browse files Browse the repository at this point in the history
Fix Uncaught (in promise) TypeError: handler is not a function
  • Loading branch information
xz8la8 authored Apr 16, 2021
2 parents 6365169 + 0cd0e9e commit 4842061
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sula/src/_util/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PubSubManager {
}
for(let i = 0, len = handlers.length; i < len; i+= 1) {
const handler = handlers[i];
handler(payload);
handler && handler(payload);
}
}

Expand Down

0 comments on commit 4842061

Please sign in to comment.