mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
refactor: shorten null check
This commit is contained in:
@@ -15,8 +15,7 @@ class Database {
|
||||
*/
|
||||
async getNotes() {
|
||||
//update our cache
|
||||
this.notes = await this.storage.read(KEYS.notes);
|
||||
if (!this.notes) this.notes = {};
|
||||
this.notes = (await this.storage.read(KEYS.notes)) || {};
|
||||
return Object.values(this.notes);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user