mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01: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
@ -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…
x
Reference in New Issue
Block a user