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

redux-persist: Stop erroring on a case we've seen empirically #5253

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

chrisbobbe
Copy link
Contributor

As discussed in the office today.

@gnprice gnprice merged commit afb08e3 into zulip:main Feb 22, 2022
@gnprice
Copy link
Member

gnprice commented Feb 22, 2022

Thanks for spotting this!

Fixed the lint error and added a few more words to the comment, and merged.


Also FTR: I said in the office that this invariant was making this error into a crash, but looking closer at the code now I see that isn't the case -- it just causes this one async function to fail and the resulting Promise to reject. So the symptoms should be identical to what they were for the same inconsistent-storage condition before we made the refactoring that added this invariant, namely that there won't be data for the given key and that subtree of the state will remain at its initial value. Which in turn promptly gets clobbered by the initial fetch, papering over the issue, as described at #4841.

@chrisbobbe chrisbobbe deleted the pr-remove-invariant branch February 22, 2022 19:50
@chrisbobbe
Copy link
Contributor Author

Great, thanks for the review and fixes!

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

Successfully merging this pull request may close these issues.

2 participants