Merge pull request #1878 from bitwarden/fix-set-storage

Convert sets to arrays before saving in storage
This commit is contained in:
Thomas Rittson 2021-06-04 15:45:30 +10:00 committed by GitHub
commit c0f7251d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,10 @@ export default class BrowserStorageService implements StorageService {
});
}
if (obj instanceof Set) {
obj = Array.from(obj);
}
const keyedObj = { [key]: obj };
return new Promise<void>(resolve => {
this.chromeStorageApi.set(keyedObj, () => {