mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 05:46:10 +01:00
added more careful handling of search note operations, fixes #683
This commit is contained in:
@@ -3,12 +3,16 @@ import server from "./server.js";
|
||||
import tree from "./tree.js";
|
||||
import noteDetailService from "./note_detail.js";
|
||||
|
||||
let hoistedNoteId;
|
||||
let hoistedNoteId = 'root';
|
||||
|
||||
optionsService.waitForOptions().then(options => {
|
||||
hoistedNoteId = options.get('hoistedNoteId');
|
||||
});
|
||||
|
||||
function getHoistedNoteNoPromise() {
|
||||
return hoistedNoteId;
|
||||
}
|
||||
|
||||
async function getHoistedNoteId() {
|
||||
await optionsService.waitForOptions();
|
||||
|
||||
@@ -49,6 +53,7 @@ async function isRootNode(node) {
|
||||
|
||||
export default {
|
||||
getHoistedNoteId,
|
||||
getHoistedNoteNoPromise,
|
||||
setHoistedNoteId,
|
||||
unhoist,
|
||||
isTopLevelNode,
|
||||
|
||||
Reference in New Issue
Block a user