From 072086f16be4c86de1f6eafd6b16da9fc44dac07 Mon Sep 17 00:00:00 2001 From: joaogsleite Date: Mon, 6 Apr 2020 11:18:14 +0100 Subject: [PATCH] fix: subscribes[componentId] is not a function --- src/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index c1795b9..ecfca75 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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()