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

fix: browser.storage should not include unknown keys in the result #15

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MikkCZ
Copy link

@MikkCZ MikkCZ commented Oct 20, 2024

As described in the documentation, when the key is not present in the storage, it should be completely missing from the .get() result as well. The current mock implementation was returning the key in the result with undefined value.

Also the lastly added session storage mock was sharing data with local storage.

As described in the [documentation](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/StorageArea/get), when the key is not present in the storage, it should be completely missing from the `.get()` result as well. The current mock implementation was returning the key in the result with `undefined` value.

Also the lastly added session storage mock was sharing data with local storage.
@RickyMarou
Copy link
Owner

@MikkCZ thank you so much for your contributions! ❤️

Please run npm run build to update the actual script that is packaged to npm.
This should be automated through CI sorry i planned on doing this but couldn't find much time to contribute to this project lately 🙈

@MikkCZ
Copy link
Author

MikkCZ commented Oct 21, 2024

Oh I see. I will then need to update all PRs, once they are rebased on top of main, right? I will start with this one.

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