diff options
Diffstat (limited to 'src/background/infrastructures/memory-storage.js')
-rw-r--r-- | src/background/infrastructures/memory-storage.js | 6 |
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); } } |