Skip to content

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

fix: unpublish causing crash due to note.publishId being undefined

thecodrr2b871eb55fef
diff --git a/packages/core/api/monographs.js b/packages/core/api/monographs.js
index 9cd8eb0dc..4fb496368 100644
--- a/packages/core/api/monographs.js
+++ b/packages/core/api/monographs.js
@@ -120,7 +120,7 @@ class Monographs {
throw new Error("This note is not published.");
await http.delete(
- `${Constants.API_HOST}/monographs/${note.publishId}`,
+ `${Constants.API_HOST}/monographs/${this.monographs[noteId]}`,
token
);