mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
move entity hash to entity_changes table
This commit is contained in:
@@ -70,9 +70,9 @@ class Note extends Entity {
|
||||
/** @returns {*} */
|
||||
getContent(silentNotFoundError = false) {
|
||||
if (this.content === undefined) {
|
||||
const res = sql.getRow(`SELECT content, hash FROM note_contents WHERE noteId = ?`, [this.noteId]);
|
||||
const content = sql.getValue(`SELECT content FROM note_contents WHERE noteId = ?`, [this.noteId]);
|
||||
|
||||
if (!res) {
|
||||
if (!content) {
|
||||
if (silentNotFoundError) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ class Note extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
this.content = res.content;
|
||||
this.content = content;
|
||||
|
||||
if (this.isProtected) {
|
||||
if (this.isContentAvailable) {
|
||||
|
||||
Reference in New Issue
Block a user