Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
added debugModeEnabled option
zadamec7021b436e9
diff --git a/src/public/app/services/ws.js b/src/public/app/services/ws.jsindex 4f8e47b96c..502b8596c4 100644--- a/src/public/app/services/ws.js+++ b/src/public/app/services/ws.js@@ -155,10 +155,14 @@ async function consumeSyncData() {catch (e) {logError(`Encountered error ${e.message}: ${e.stack}, reloading frontend.`);- // if there's an error in updating the frontend then the easy option to recover is to reload the frontend completely- if (!glob.isDev) {+ if (!glob.isDev && !options.is('debugModeEnabled')) {+ // if there's an error in updating the frontend then the easy option to recover is to reload the frontend completely+utils.reloadApp();}+ else {+ alert("Encountered error, check out the console.");+ }}for (const syncRow of nonProcessedSyncRows) {diff --git a/src/services/options_init.js b/src/services/options_init.jsindex 4fe655a182..26283a4243 100644--- a/src/services/options_init.js+++ b/src/services/options_init.js@@ -87,7 +87,8 @@ const defaultOptions = [{ name: 'hideIncludedImages_main', value: 'true', isSynced: false },{ name: 'attributeListExpanded', value: 'false', isSynced: false },{ name: 'promotedAttributesExpanded', value: 'true', isSynced: true },- { name: 'similarNotesExpanded', value: 'true', isSynced: true }+ { name: 'similarNotesExpanded', value: 'true', isSynced: true },+ { name: 'debugModeEnabled', value: 'false', isSynced: false }];function initStartupOptions() {