Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: cannot convert undefined to object

thecodrr2d0eb3fb3341
diff --git a/packages/core/api/settings.js b/packages/core/api/settings.js
index 37b3c01e3..dd950727a 100644
--- a/packages/core/api/settings.js
+++ b/packages/core/api/settings.js
@@ -16,7 +16,8 @@ class Settings {
this._initSettings();
var settings = await this._db.context.read("settings");
if (settings) this._settings = settings;
- else await this._saveSettings();
+ if (!this._settings.groupOptions) this._settings.groupOptions = {};
+ await this._saveSettings();
EV.subscribe(EVENTS.userLoggedOut, () => {
this._settings = undefined;