mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 23:35:50 +01:00
many small fixes from Intellij analysis
This commit is contained in:
@@ -358,13 +358,10 @@ class FNote {
|
||||
}
|
||||
|
||||
const parentNotes = this.getParentNotes();
|
||||
let notePaths = [];
|
||||
|
||||
if (parentNotes.length === 1) { // optimization for most common case
|
||||
notePaths = parentNotes[0].getAllNotePaths();
|
||||
} else {
|
||||
notePaths = parentNotes.flatMap(parentNote => parentNote.getAllNotePaths());
|
||||
}
|
||||
const notePaths = parentNotes.length === 1
|
||||
? parentNotes[0].getAllNotePaths() // optimization for most common case
|
||||
: parentNotes.flatMap(parentNote => parentNote.getAllNotePaths());
|
||||
|
||||
for (const notePath of notePaths) {
|
||||
notePath.push(this.noteId);
|
||||
|
||||
Reference in New Issue
Block a user