Skip to content

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

fix: check if cached monographs are null

thecodrrd74fa138b90e
diff --git a/packages/core/api/monographs.js b/packages/core/api/monographs.js
index 0387d6cb8..8ef03b9b0 100644
--- a/packages/core/api/monographs.js
+++ b/packages/core/api/monographs.js
@@ -35,6 +35,7 @@ class Monographs {
* @returns {boolean} Whether note is published or not.
*/
async isPublished(noteId) {
+ if (!this.monographs) return false;
return !!this.monographs[noteId];
}
@@ -44,6 +45,7 @@ class Monographs {
* @returns Monograph Id
*/
async monograph(noteId) {
+ if (!this.monographs) return;
return this.monographs[noteId];
}