diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-04-02 12:42:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 12:42:06 -0400 |
commit | 8179846e381eb0a87bf3bc266abec8f4400565bc (patch) | |
tree | ddb57d7870b461c9758f6de8a25dd76bbfaf81f7 /ext/js/display | |
parent | 36b7e34cce776cb09a76c28ce8e78e864dabcdda (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/display')
-rw-r--r-- | ext/js/display/display.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/display/display.js b/ext/js/display/display.js index 1e5c569d..ce4459fe 100644 --- a/ext/js/display/display.js +++ b/ext/js/display/display.js @@ -1463,7 +1463,7 @@ class Display extends EventDispatcher { async _createNote(definition, mode, context, injectMedia, errors) { const options = this._options; - const templates = this._ankiFieldTemplates; + const template = this._ankiFieldTemplates; const { general: {resultOutputMode, glossaryLayoutMode, compactTags}, anki: ankiOptions @@ -1488,7 +1488,7 @@ class Display extends EventDispatcher { definition, mode, context, - templates, + template, deckName, modelName, fields, |