From 3d1c80bc965942f59ae7befb6481011ddbdecc6d Mon Sep 17 00:00:00 2001 From: thewisefarmerr Date: Fri, 29 Nov 2019 06:41:03 +0500 Subject: [PATCH] fix: getNotes() sets this.notes to null --- packages/core/api/database.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/api/database.js b/packages/core/api/database.js index 2fdba8f68..c10d1ba80 100644 --- a/packages/core/api/database.js +++ b/packages/core/api/database.js @@ -16,6 +16,7 @@ class Database { async getNotes() { //update our cache this.notes = await this.storage.read(KEYS.notes); + if (!this.notes) this.notes = {}; return Object.values(this.notes); }