mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
fix recent notes issues
This commit is contained in:
@@ -161,6 +161,15 @@ function getNoteTitle(noteId, parentNoteId) {
|
||||
function getNoteTitleForPath(path) {
|
||||
const titles = [];
|
||||
|
||||
if (path[0] === 'root') {
|
||||
if (path.length === 1) {
|
||||
return getNoteTitle('root');
|
||||
}
|
||||
else {
|
||||
path = path.slice(1);
|
||||
}
|
||||
}
|
||||
|
||||
let parentNoteId = 'root';
|
||||
|
||||
for (const noteId of path) {
|
||||
@@ -279,5 +288,6 @@ sqlInit.dbReady.then(() => utils.stopWatch("Autocomplete load", load));
|
||||
|
||||
module.exports = {
|
||||
findNotes,
|
||||
getNotePath
|
||||
getNotePath,
|
||||
getNoteTitleForPath
|
||||
};
|
||||
Reference in New Issue
Block a user