Skip to content

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

fix: do not return undefined in pins

thecodrre43d466382e6
diff --git a/packages/core/api/settings.js b/packages/core/api/settings.js
index 12a34e881..1f3aa57d0 100644
--- a/packages/core/api/settings.js
+++ b/packages/core/api/settings.js
@@ -66,7 +66,7 @@ class Settings {
}
get pins() {
- return this._settings.pins.map((pin) => {
+ return this._settings.pins.reduce((prev, pin) => {
if (pin.type === "notebook") {
return this._db.notebooks.notebook(pin.data.id).data;
} else if (pin.type === "topic") {
@@ -76,7 +76,8 @@ class Settings {
} else if (pin.type === "tag") {
return this._db.tags.tag(pin.data.id);
}
- });
+ return prev;
+ }, []);
}
}
export default Settings;