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: handle case where content.data is an object
thecodrr13f324878b73
diff --git a/packages/core/collections/content.js b/packages/core/collections/content.jsindex 28c614853..70ee76e87 100644--- a/packages/core/collections/content.js+++ b/packages/core/collections/content.js@@ -6,6 +6,16 @@ import { hasItem } from "../utils/array";export default class Content extends Collection {async add(content) {if (!content) return;++ if (typeof content.data === "object") {+ if (typeof content.data.data === "string")+ content.data = content.data.data;+ else+ content.data = `<p>Content is invalid: ${JSON.stringify(+ content.data+ )}</p>`;+ }+if (content.remote || content.deleted || content.migrated)return await this._collection.addItem(await this.extractAttachments(content)