From c6dcac6d58c6cd3e65a537d6f582332b40a8912c Mon Sep 17 00:00:00 2001 From: mshgh <36337240+mshgh@users.noreply.github.com> Date: Sat, 6 May 2023 14:16:53 +0200 Subject: [PATCH] enh(patchSubs) it is silently assumed unsubscribe handler has not return value, however if it has it compromises subscriptions processing to make the code more robust I propose to ignore the return value and push into `subs` always `false` (it would work with `unsubscribe` too, but `false` is shorter ;) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 36f82bd7..b67cc97d 100644 --- a/index.js +++ b/index.js @@ -56,7 +56,7 @@ var patchSubs = (oldSubs, newSubs = EMPTY_ARR, dispatch) => { (oldSub && oldSub[2](), newSub[0](dispatch, newSub[1])), ] : oldSub - : oldSub && oldSub[2]() + : (oldSub && oldSub[2](), false) ) } return subs