mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
API changes necessary to port reddit plugin, closes #58
This commit is contained in:
@@ -12,7 +12,7 @@ async function executeScript(dataKey, script, params) {
|
||||
let ret;
|
||||
|
||||
await sql.doInTransaction(async () => {
|
||||
ret = await (function() { return eval(`(${script})(${paramsStr})`); }.call(ctx));
|
||||
ret = await (function() { return eval(`const api = this; (${script})(${paramsStr})`); }.call(ctx));
|
||||
});
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user