Skip to content

Build your personal knowledge base with Trilium Notes

client: recent changes list: properly handle clicks on items referencing deleted notes

Adorian Doran5caf4c246172
diff --git a/src/public/app/widgets/dialogs/recent_changes.js b/src/public/app/widgets/dialogs/recent_changes.js
index ff3a2ad61c..bbcfce2f14 100644
--- a/src/public/app/widgets/dialogs/recent_changes.js
+++ b/src/public/app/widgets/dialogs/recent_changes.js
@@ -121,7 +121,8 @@ export default class RecentChangesDialog extends BasicWidget {
$changesList.append($('<li>')
.on("click", (e) => {
- if (e.target?.nodeName !== "A") { // Ignore clicks on the link
+ // Skip clicks on the link or deleted notes
+ if (e.target?.nodeName !== "A" && !change.current_isDeleted) {
// Open the current note
appContext.tabManager.getActiveContext().setNote(change.noteId);
}