fix js note can't run

This commit is contained in:
Jin 2024-08-15 18:50:17 +02:00
parent d2bd369144
commit 69586e6876
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ function getNewNoteTitle(parentNote: BNote) {
// - now
// - parentNote
title = (0, eval)(`\`${titleTemplate}\``);
title = eval(`\`${titleTemplate}\``);
} catch (e: any) {
log.error(`Title template of note '${parentNote.noteId}' failed with: ${e.message}`);
}

View File

@ -99,7 +99,7 @@ function executeScript(script: string, params: ScriptParams, startNoteId: string
}
function execute(ctx: ScriptContext, script: string) {
return function () { return (0, eval)(`const apiContext = this;\r\n(${script}\r\n)()`); }.call(ctx);
return function () { return eval(`const apiContext = this;\r\n(${script}\r\n)()`); }.call(ctx);
}
function getParams(params?: ScriptParams) {