diff --git a/bin/release-flatpack.sh b/bin/release-flatpack.sh index 69288d78a..9edc56749 100755 --- a/bin/release-flatpack.sh +++ b/bin/release-flatpack.sh @@ -26,9 +26,15 @@ if ! git diff-index --quiet HEAD --; then exit 1 fi -xmlstarlet ed --inplace --update "/component/releases/release/@version" --value "${VERSION}" --update "/component/releases/release/@date" --value "${VERSION_DATE}" ./trilium-flathub/com.github.zadam.trilium.metainfo.xml +flatpak-node-generator npm ../trilium/package-lock.json -yq --inplace "(.modules[0].sources[0].tag = \"v${VERSION}\") | (.modules[0].sources[0].commit = \"${VERSION_COMMIT}\")" ./trilium-flathub/com.github.zadam.trilium.yml +xmlstarlet ed --inplace --update "/component/releases/release/@version" --value "${VERSION}" --update "/component/releases/release/@date" --value "${VERSION_DATE}" ./com.github.zadam.trilium.metainfo.xml + +yq --inplace "(.modules[0].sources[0].tag = \"v${VERSION}\") | (.modules[0].sources[0].commit = \"${VERSION_COMMIT}\")" ./com.github.zadam.trilium.yml + +git add ./generated-sources.json +git add ./com.github.zadam.trilium.metainfo.xml +git add ./com.github.zadam.trilium.yml git commit -m "release $VERSION" git push diff --git a/package.json b/package.json index 434c67b44..b1a0b6976 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "trilium", "productName": "Trilium Notes", "description": "Trilium Notes", - "version": "0.54.2", + "version": "0.54.3", "license": "AGPL-3.0-only", "main": "electron.js", "bin": { diff --git a/src/public/app/widgets/attribute_widgets/attribute_editor.js b/src/public/app/widgets/attribute_widgets/attribute_editor.js index bbc27fe4f..84fba78b1 100644 --- a/src/public/app/widgets/attribute_widgets/attribute_editor.js +++ b/src/public/app/widgets/attribute_widgets/attribute_editor.js @@ -297,6 +297,12 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget { } async save() { + if (this.lastUpdatedNoteId !== this.noteId) { + // https://github.com/zadam/trilium/issues/3090 + console.warn("Ignoring blur event because a different note is loaded."); + return; + } + const attributes = this.parseAttributes(); if (attributes) { @@ -354,6 +360,8 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget { } dataChanged() { + this.lastUpdatedNoteId = this.noteId; + if (this.lastSavedContent === this.textEditor.getData()) { this.$saveAttributesButton.fadeOut(); } diff --git a/src/routes/api/tree.js b/src/routes/api/tree.js index 95cd9d1c0..7874814c2 100644 --- a/src/routes/api/tree.js +++ b/src/routes/api/tree.js @@ -97,6 +97,11 @@ function getNotesAndBranchesAndAttributes(noteIds) { for (const attributeId of collectedAttributeIds) { const attribute = becca.attributes[attributeId]; + if (!attribute) { + log.error(`Could not find attribute for attributeId=${attributeId}`); + continue; + } + attributes.push({ attributeId: attribute.attributeId, noteId: attribute.noteId, diff --git a/src/services/build.js b/src/services/build.js index 8e936c7ee..50d88015b 100644 --- a/src/services/build.js +++ b/src/services/build.js @@ -1 +1 @@ -module.exports = { buildDate:"2022-08-07T23:20:59+02:00", buildRevision: "3a07c5fcc059019a2330a3f6ed204eeb5df1539d" }; +module.exports = { buildDate:"2022-08-26T22:16:49+02:00", buildRevision: "e9090b9154f8578fa85f02113bbf4f1050638eb3" };