Skip to content
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

Extra check that always true #9

Open
Guria opened this issue Mar 14, 2019 · 1 comment
Open

Extra check that always true #9

Guria opened this issue Mar 14, 2019 · 1 comment

Comments

@Guria
Copy link

Guria commented Mar 14, 2019

from the sources:

const newState = JSON.parse(newValue);
    if (k === key && state !== newState)

state !== newState would always resolve to true since newState is just a newly created object returned from JSON parse

@nbouscal
Copy link

If the state is a number or string this check is meaningful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants