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
don't change sourceId for script execution which forces full tree reloads because it is annoying
zadam751bf947583a
diff --git a/src/services/script.js b/src/services/script.jsindex f3e10166e7..91872b00a8 100644--- a/src/services/script.js+++ b/src/services/script.js@@ -71,9 +71,6 @@ async function executeScript(script, params, startNoteId, currentNoteId, originE}async function execute(ctx, script) {- // scripts run as "server" sourceId so clients recognize the changes as "foreign" and update themselves- cls.namespace.set('sourceId', sourceIdService.getCurrentSourceId());-return await (function() { return eval(`const apiContext = this;\r\n(${script}\r\n)()`); }.call(ctx));}