Skip to content

Build your personal knowledge base with Trilium Notes

fix export root note

zadam7ee50113d7fc
diff --git a/src/public/app/services/tree_cache.js b/src/public/app/services/tree_cache.js
index 0caa12d56d..27815d4d8d 100644
--- a/src/public/app/services/tree_cache.js
+++ b/src/public/app/services/tree_cache.js
@@ -276,6 +276,10 @@ class TreeCache {
}
async getBranchId(parentNoteId, childNoteId) {
+ if (childNoteId === 'root') {
+ return 'root';
+ }
+
const child = await this.getNote(childNoteId);
if (!child) {
diff --git a/src/public/app/services/tree_context_menu.js b/src/public/app/services/tree_context_menu.js
index 65dd8f9241..0c37e51582 100644
--- a/src/public/app/services/tree_context_menu.js
+++ b/src/public/app/services/tree_context_menu.js
@@ -3,7 +3,6 @@ import treeCache from "./tree_cache.js";
import hoistedNoteService from './hoisted_note.js';
import clipboard from './clipboard.js';
import protectedSessionHolder from "./protected_session_holder.js";
-import appContext from "./app_context.js";
import noteCreateService from "./note_create.js";
import contextMenu from "./context_menu.js";
diff --git a/src/public/app/services/ws.js b/src/public/app/services/ws.js
index 502b8596c4..29187c29e5 100644
--- a/src/public/app/services/ws.js
+++ b/src/public/app/services/ws.js
@@ -150,7 +150,7 @@ async function consumeSyncData() {
const nonProcessedSyncRows = allSyncRows.filter(sync => !processedEntityChangeIds.has(sync.id));
try {
- await utils.timeLimit(processSyncRows(nonProcessedSyncRows), 5000);
+ await utils.timeLimit(processSyncRows(nonProcessedSyncRows), 15000);
}
catch (e) {
logError(`Encountered error ${e.message}: ${e.stack}, reloading frontend.`);
@@ -161,7 +161,9 @@ async function consumeSyncData() {
utils.reloadApp();
}
else {
- alert("Encountered error, check out the console.");
+ console.log("nonProcessedSyncRows causing the timeout", nonProcessedSyncRows);
+
+ alert(`Encountered error "${e.message}", check out the console.`);
}
}