This commit is contained in:
zadam
2023-04-16 09:26:52 +02:00
parent a1d4e062ed
commit 2e794ee38f
2 changed files with 5 additions and 4 deletions

View File

@@ -22,10 +22,12 @@ class NoteFlatTextExp extends Expression {
* @param {string[]} tokens
* @param {string[]} path
*/
function searchDownThePath(note, tokens, path) {
const searchDownThePath = (note, tokens, path) => {
if (tokens.length === 0) {
const retPath = this.getNotePath(note, path);
console.log(retPath);
if (retPath) {
const noteId = retPath[retPath.length - 1];
@@ -136,7 +138,7 @@ class NoteFlatTextExp extends Expression {
return note.getBestNotePath();
} else {
const closestNoteId = path[0];
const closestNoteBestNotePath = becca.getNote(closestNoteId).getBestNotePathString();
const closestNoteBestNotePath = becca.getNote(closestNoteId).getBestNotePath();
return [...closestNoteBestNotePath, ...path.slice(1)];
}