Skip to content

Commit

Permalink
fix: subscribes[componentId] is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
joaogsleite committed Apr 6, 2020
1 parent 94b3b8b commit 072086f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ function triggerSubscriptions() {
(componentId: string) => {
new Promise(
(resolve, reject) => {
subscribes[componentId]()
if (subscribes[componentId] && typeof subscribes[componentId] === 'function') {
subscribes[componentId]()
}
resolve()
}
).then()
Expand Down

0 comments on commit 072086f

Please sign in to comment.