diff --git a/main.js b/main.js index e6885434..3b5d66cc 100644 --- a/main.js +++ b/main.js @@ -5570,7 +5570,7 @@ function populateMain(settings, mainG, source, field, target, sourceOrder, targe } const getTargetOrder = (frontms, target) => { var _a, _b; - return parseInt((_b = (_a = frontms.find((arr) => arr.file.basename === target)) === null || _a === void 0 ? void 0 : _a[BC_ORDER]) !== null && _b !== void 0 ? _b : "9999"); + return parseInt((_b = (_a = frontms.find((ff) => { var _a; return ((_a = ff === null || ff === void 0 ? void 0 : ff.file) === null || _a === void 0 ? void 0 : _a.basename) === target; })) === null || _a === void 0 ? void 0 : _a[BC_ORDER]) !== null && _b !== void 0 ? _b : "9999"); }; const getSourceOrder = (frontm) => { var _a; return parseInt((_a = frontm[BC_ORDER]) !== null && _a !== void 0 ? _a : "9999"); }; /** Remember to filter by hierarchy in MatrixView! */ diff --git a/src/AlternativeHierarchies/HierarchyNotes/HierarchyNoteManipulator.ts b/src/AlternativeHierarchies/HierarchyNotes/HierarchyNoteManipulator.ts index e9a7d23e..8c81ad70 100644 --- a/src/AlternativeHierarchies/HierarchyNotes/HierarchyNoteManipulator.ts +++ b/src/AlternativeHierarchies/HierarchyNotes/HierarchyNoteManipulator.ts @@ -123,7 +123,7 @@ export class HierarchyNoteManipulator extends FuzzySuggestModal { const { editor } = view ?? {}; if (!editor) return; //@ts-ignore - await view.leaf.openFile(this.file, { active: true, mode: "source" }); + view.leaf.openFile(this.file, { active: true, mode: "source" }); editor.setCursor({ line: item.lineNo, ch: item.depth + 2 }); } else if (evt instanceof KeyboardEvent || evt instanceof MouseEvent) { let rel: "up" | "down" | "same";