aboutsummaryrefslogtreecommitdiff
path: root/src/background/infrastructures/memory-storage.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/infrastructures/memory-storage.js')
-rw-r--r--src/background/infrastructures/memory-storage.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/background/infrastructures/memory-storage.js b/src/background/infrastructures/memory-storage.js
index 234a9b8..3a7e4f2 100644
--- a/src/background/infrastructures/memory-storage.js
+++ b/src/background/infrastructures/memory-storage.js
@@ -10,6 +10,10 @@ export default class MemoryStorage {
}
get(name) {
- return JSON.parse(db[name]);
+ let data = db[name];
+ if (!data) {
+ return undefined;
+ }
+ return JSON.parse(data);
}
}