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

This commit is contained in:
Adorian Doran 2024-12-13 02:48:33 +02:00
parent 0417a6e144
commit 5caf4c2461

View File

@ -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);
}