-
Notifications
You must be signed in to change notification settings - Fork 780
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hey, when stopping the app by dispatching null
, the following error is thrown:
"Cannot read properties of null (reading 'length')".
It looks like the issue is caused by the following code:
if ((state = newState) == null) dispatch = subscriptions = render = id
if (subscriptions) subs = patchSubs(subs, subscriptions(state), dispatch)
When null
is dispatched, the subscriptions variable becomes a reference to (a) => a
.
As a result, it returns null
when called with patchSubs(subs, subscriptions(state), dispatch)
instead of an array (which is causing the issue)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working