Skip to content

Commit

Permalink
Merge branch 'feat/storage-message' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
camewell071 committed Jan 15, 2024
2 parents 7484fd5 + ce667f6 commit 70b7f4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/storage/allowlist.storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface IStorageItem {
}

class AllowListStorage {
private static STORAGE_KEY = 'ALLOW_LIST_STORAGE';
private static STORAGE_KEY = 'ALLOW_LIST_STORAGE_0.0.1';

public static getStorage = (): IStorageItem[] | undefined => {
const data = storage.get(this.STORAGE_KEY);
Expand All @@ -24,7 +24,8 @@ class AllowListStorage {
storage.set(this.STORAGE_KEY, JSON.stringify([payload]));
return;
}
storage.set(this.STORAGE_KEY, JSON.stringify(data.push(payload)));
data.push(payload)
storage.set(this.STORAGE_KEY, JSON.stringify(data));
} catch (error) {
console.log('setStorage error: ', error);
}
Expand Down

0 comments on commit 70b7f4e

Please sign in to comment.