You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Persistence data plugin should take into account the object shape #9994
The persistence data plugin helps to persist parts of the state in between sessions. When the data persisted is an object (e.g. the preferences key in the editor, nux, or edit-post stores) new keys added to that object will be invalidated once the persistence mechanism retrieves old data from cache.
How to test
Clean browser application cache, check out master branch, and run Gutenberg.
Create a new branch and add some code that adds a new key to the preferences object whose value is true by default.
Execute that new branch.
Expected result is that the preferences object will have the new truthy value but instead it has the state retrieved from local storage (which doesn't have the new added key).
Activity
oandregal commentedon Sep 18, 2018
cc @aduth @youknowriad in case it is of any help, I ran into this while working on #9760
youknowriad commentedon Sep 18, 2018
This was working at some point, so I think it's a regression.
aduth commentedon Sep 18, 2018
Could be related to #8341