deleteProperty() if no key provided delete by id

This commit is contained in:
Official Noob
2020-01-16 18:13:07 +00:00
committed by GitHub
parent e286797ac5
commit 5df0801c64

3
SB.js
View File

@@ -38,6 +38,9 @@ class MapIO {
} }
deleteProperty(key) { deleteProperty(key) {
if(key === undefined) {
return chrome.storage.sync.remove(this.id);
}
if (this.map.has(key)) { if (this.map.has(key)) {
// Proxy to map // Proxy to map
this.map.delete(key); this.map.delete(key);