From bb9de357226fe456d80fbb220b12e42c3448f865 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 2 Feb 2020 18:26:43 -0500 Subject: [PATCH] Fixed naming issue --- src/SB.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/SB.ts b/src/SB.ts index 019ef8e1..8a581068 100644 --- a/src/SB.ts +++ b/src/SB.ts @@ -61,50 +61,50 @@ var SB: SBObject = { // Saves the changes to chrome.storage in json form class MapIO { id: string; - SBMap: SBMap; + map: SBMap; constructor(id) { // The name of the item in the array this.id = id; // A local copy of the SBMap (SB.config.SBMapname.SBMap) - this.SBMap = SB.localConfig[this.id]; + this.map = SB.localConfig[this.id]; } set(key, value) { // Proxy to SBMap - this.SBMap.set(key, value); + this.map.set(key, value); // Store updated SBMap locally chrome.storage.sync.set({ - [this.id]: encodeStoredItem(this.SBMap) + [this.id]: encodeStoredItem(this.map) }); - return this.SBMap; + return this.map; } get(key) { - return this.SBMap.get(key); + return this.map.get(key); } has(key) { - return this.SBMap.has(key); + return this.map.has(key); } size() { - return this.SBMap.size; + return this.map.size; } delete(key) { // Proxy to SBMap - this.SBMap.delete(key); + this.map.delete(key); // Store updated SBMap locally chrome.storage.sync.set({ - [this.id]: encodeStoredItem(this.SBMap) + [this.id]: encodeStoredItem(this.map) }); } clear() { - this.SBMap.clear(); + this.map.clear(); chrome.storage.sync.set({ - [this.id]: encodeStoredItem(this.SBMap) + [this.id]: encodeStoredItem(this.map) }); } }