fix a bug where render note content could be set to null during renaming

This commit is contained in:
zadam 2019-10-21 22:56:43 +02:00
parent 41d47c5d33
commit 3de124748d
4 changed files with 8 additions and 10 deletions

View File

@ -2,7 +2,7 @@
echo "Deleting existing builds"
rm -r dist/*
rm -rf dist/*
SRC_DIR=dist/trilium-src

File diff suppressed because one or more lines are too long

View File

@ -82,8 +82,6 @@ async function handleMessage(event) {
let syncIdReachedListeners = [];
function waitForSyncId(desiredSyncId) {
console.log("Waiting for ", desiredSyncId);
if (desiredSyncId <= lastSyncId) {
return Promise.resolve();
}

View File

@ -370,7 +370,7 @@ async function updateNote(noteId, noteUpdates) {
note.isProtected = noteUpdates.isProtected;
await note.save();
if (!['file', 'image'].includes(note.type)) {
if (!['file', 'image', 'render'].includes(note.type)) {
noteUpdates.content = await saveLinks(note, noteUpdates.content);
await note.setContent(noteUpdates.content);