mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 12:50:47 +08:00
don't change sourceId for script execution which forces full tree reloads because it is annoying
This commit is contained in:
parent
4b934a4a81
commit
751bf94758
1 changed files with 0 additions and 3 deletions
|
|
@ -71,9 +71,6 @@ async function executeScript(script, params, startNoteId, currentNoteId, originE
|
||||||
}
|
}
|
||||||
|
|
||||||
async function execute(ctx, script) {
|
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));
|
return await (function() { return eval(`const apiContext = this;\r\n(${script}\r\n)()`); }.call(ctx));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue