A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: duplicate settings are creating on login
thecodrr6ea4d1986911
diff --git a/packages/core/api/settings.js b/packages/core/api/settings.jsindex aa6abfe1c..6c01b0db3 100644--- a/packages/core/api/settings.js+++ b/packages/core/api/settings.js@@ -9,12 +9,16 @@ class Settings {*/constructor(db) {this._db = db;+ this._initSettings();+ }++ _initSettings() {this._settings = {type: "settings",id: id(),pins: [],- dateEdited: Date.now(),- dateCreated: Date.now(),+ dateEdited: 0,+ dateCreated: 0,};}@@ -38,13 +42,7 @@ class Settings {if (settings) this._settings = settings;EV.subscribe(EVENTS.userLoggedOut, () => {this._settings = undefined;- this._settings = {- type: "settings",- id: id(),- pins: [],- dateEdited: 0,- dateCreated: 0,- };+ this._initSettings();});}