-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read properties of null (reading 'length') #1111
Comments
btw, similar issue happens with |
The docs say, about stopping apps:
So the right way to stop an app is not to dispatch null but to dispatch undefined. Not sure wether that makes a difference (can’t easily try at the moment) |
@zaceno stopping app using |
Could you make a pen with your code? |
@jorgebucaran https://codepen.io/sergey-shpak/pen/dyqVbYZ (errors in console section) |
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:
When
null
is dispatched, the subscriptions variable becomes a reference to(a) => a
.As a result, it returns
null
when called withpatchSubs(subs, subscriptions(state), dispatch)
instead of an array (which is causing the issue)The text was updated successfully, but these errors were encountered: