mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
Convert sets to arrays before saving to storage (#1012)
This commit is contained in:
parent
a554c0e660
commit
c0f85366bd
@ -49,6 +49,10 @@ export class HtmlStorageService implements StorageService {
|
|||||||
return this.remove(key);
|
return this.remove(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (obj instanceof Set) {
|
||||||
|
obj = Array.from(obj);
|
||||||
|
}
|
||||||
|
|
||||||
const json = JSON.stringify(obj);
|
const json = JSON.stringify(obj);
|
||||||
if (this.isLocalStorage(key)) {
|
if (this.isLocalStorage(key)) {
|
||||||
window.localStorage.setItem(key, json);
|
window.localStorage.setItem(key, json);
|
||||||
|
Loading…
Reference in New Issue
Block a user