aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 4db88365..38dbd0f1 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -389,8 +389,12 @@ class Backend {
return this.anki.guiBrowse(`nid:${noteId}`);
}
- _onApiTemplateRender({template, data, dynamic}) {
- return apiTemplateRender(template, data, dynamic);
+ async _onApiTemplateRender({template, data, dynamic}) {
+ return (
+ dynamic ?
+ handlebarsRenderDynamic(template, data) :
+ handlebarsRenderStatic(template, data)
+ );
}
_onApiCommandExec({command, params}) {