-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Initial State Migration Bug (#399)
* Fix Initial State Migration Bug This commit fixes a bug where the merging of the initial state and the persisted state when creating the redux store caused the latest version to get attached to the old version. This prevented the migration from functioning properly since the version was the latest even though the data was not. Now, the initial state isn't given when creating the store, so the only starting state used comes from the persisted local storage state (if it exists). The top level reducer uses the initial state if the incoming state is null. This does not affect any other parts of the frontend but should prevent migration issues when the persisted state is v0.0.0 * Run migrator on init action This commit updates the top level reducer to run the migrators on the init action. This should allow us to properly initialize the store using the migrator without having to go through full reducer cycle.
- Loading branch information
Showing
3 changed files
with
13 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters