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

Stop using StorageArea.set directly with complex types #12

Open
KL13NT opened this issue Mar 30, 2021 · 0 comments
Open

Stop using StorageArea.set directly with complex types #12

KL13NT opened this issue Mar 30, 2021 · 0 comments
Assignees
Labels
bug Something isn't working priority

Comments

@KL13NT
Copy link
Owner

KL13NT commented Mar 30, 2021

As documented on the MDN page:

It's generally not possible to store other types, such as Function, Date, RegExp, Set, Map, ArrayBuffer, and so on. Some of these unsupported types will restore as an empty object, and some cause set() to throw an error. The exact behavior here is browser-specific.

The behavior on Firefox, luckily enough, stores Date as strings, but we need to serialize before updating data.

@KL13NT KL13NT added bug Something isn't working priority labels Mar 30, 2021
@KL13NT KL13NT self-assigned this Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority
Projects
None yet
Development

No branches or pull requests

1 participant