mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
fix: check if cached monographs are null
This commit is contained in:
@@ -35,6 +35,7 @@ class Monographs {
|
|||||||
* @returns {boolean} Whether note is published or not.
|
* @returns {boolean} Whether note is published or not.
|
||||||
*/
|
*/
|
||||||
async isPublished(noteId) {
|
async isPublished(noteId) {
|
||||||
|
if (!this.monographs) return false;
|
||||||
return !!this.monographs[noteId];
|
return !!this.monographs[noteId];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,6 +45,7 @@ class Monographs {
|
|||||||
* @returns Monograph Id
|
* @returns Monograph Id
|
||||||
*/
|
*/
|
||||||
async monograph(noteId) {
|
async monograph(noteId) {
|
||||||
|
if (!this.monographs) return;
|
||||||
return this.monographs[noteId];
|
return this.monographs[noteId];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user