1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

fixes to safariapp messaging

This commit is contained in:
Kyle Spearrin
2019-08-15 14:48:02 -04:00
parent 87abab1eb8
commit fcc777cded
3 changed files with 10 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ export default class BrowserStorageService implements StorageService {
async get<T>(key: string): Promise<T> {
if (this.isSafari) {
const obj = await SafariApp.sendMessageToApp('storage_get', key);
return JSON.parse(obj) as T;
return obj == null ? null : JSON.parse(obj) as T;
} else {
return new Promise((resolve) => {
this.chromeStorageApi.get(key, (obj: any) => {