fix: locked note is favorited

This commit is contained in:
thecodrr
2021-02-22 09:42:34 +05:00
parent df4c98b27b
commit 0a844b55c0
2 changed files with 12 additions and 3 deletions

View File

@@ -184,9 +184,9 @@ export default class Vault {
let { id, content: { type, data } = {}, contentId } = note;
if (!data || !type || !contentId) {
note = this._db.notes.note(id);
if (note.data.locked) return;
contentId = note.data.contentId;
note = this._db.notes.note(id).data;
if (note.locked) return;
contentId = note.contentId;
let content = await this._db.content.raw(contentId);
data = content.data;
type = content.type;