mirror of
https://github.com/zadam/trilium.git
synced 2025-02-25 07:25:32 +08:00
Merge branch 'stable'
# Conflicts: # src/routes/api/files.js # src/routes/api/note_revisions.js # src/routes/api/notes.js # src/services/image.js
This commit is contained in:
commit
d3ee0aa8a8
1 changed files with 7 additions and 2 deletions
|
@ -1,9 +1,8 @@
|
|||
"use strict";
|
||||
|
||||
const NoteRevision = require('../becca/entities/note_revision');
|
||||
const dateUtils = require('./date_utils');
|
||||
const log = require('./log');
|
||||
const sql = require('./sql');
|
||||
const protectedSession = require("./protected_session");
|
||||
|
||||
/**
|
||||
* @param {Note} note
|
||||
|
@ -11,6 +10,12 @@ const sql = require('./sql');
|
|||
function protectNoteRevisions(note) {
|
||||
for (const revision of note.getNoteRevisions()) {
|
||||
if (note.isProtected !== revision.isProtected) {
|
||||
if (!protectedSession.isProtectedSessionAvailable()) {
|
||||
log.error("Protected session is not available to fix note revisions.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const content = revision.getContent();
|
||||
|
||||
|
|
Loading…
Reference in a new issue