summaryrefslogtreecommitdiff
path: root/ext/js/templates/template-renderer-frame-main.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-04-02 12:42:06 -0400
committerGitHub <noreply@github.com>2021-04-02 12:42:06 -0400
commit8179846e381eb0a87bf3bc266abec8f4400565bc (patch)
treeddb57d7870b461c9758f6de8a25dd76bbfaf81f7 /ext/js/templates/template-renderer-frame-main.js
parent36b7e34cce776cb09a76c28ce8e78e864dabcdda (diff)
Refactor template rendering (#1583)
* Update _errorToJson to _serializeError * Remove async * Refactor render * Simplify _getModifiedData * Rename data => commonData * Rename templates => template for consistency * Improve errors check * Update tests
Diffstat (limited to 'ext/js/templates/template-renderer-frame-main.js')
-rw-r--r--ext/js/templates/template-renderer-frame-main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/js/templates/template-renderer-frame-main.js b/ext/js/templates/template-renderer-frame-main.js
index c915d6b0..40ecf308 100644
--- a/ext/js/templates/template-renderer-frame-main.js
+++ b/ext/js/templates/template-renderer-frame-main.js
@@ -27,7 +27,7 @@
const templateRenderer = new TemplateRenderer(japaneseUtil);
const ankiNoteDataCreator = new AnkiNoteDataCreator(japaneseUtil);
templateRenderer.registerDataType('ankiNote', {
- modifier: ({data, marker}) => ankiNoteDataCreator.create(marker, data)
+ modifier: ({marker, commonData}) => ankiNoteDataCreator.create(marker, commonData)
});
const templateRendererFrameApi = new TemplateRendererFrameApi(templateRenderer);
templateRendererFrameApi.prepare();