-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues with incorrect serialization of LocalStorageDB items (#5969)
## Changes To avoid further doubts I adjusted behaviour and interface of `LocalStorageDB`to be more in sunc with `vscode.Memento`, that is: * setting key to `null` or `undefined` removes key from the store * get on non-existing key returns an `undefined` Note that it means setting key to `null` and then doing get on it will result in `undefined` value, not a `null`. I also added exception handling in the `LocalStorageDB::get` to make sure we won't fail on previously incorrectly serialised values. ## Test plan Unit tests which should cover all corner cases were added.
- Loading branch information
Showing
2 changed files
with
94 additions
and
11 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