fix: check if cached monographs are null

This commit is contained in:
thecodrr
2021-06-15 12:00:00 +05:00
parent 09eac22eaf
commit d74fa138b9

View File

@@ -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];
}