aboutsummaryrefslogtreecommitdiff
path: root/ext/js/settings/anki-templates-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/settings/anki-templates-controller.js')
-rw-r--r--ext/js/settings/anki-templates-controller.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/js/settings/anki-templates-controller.js b/ext/js/settings/anki-templates-controller.js
index 31bd1e92..8e3a1a70 100644
--- a/ext/js/settings/anki-templates-controller.js
+++ b/ext/js/settings/anki-templates-controller.js
@@ -17,7 +17,6 @@
/* global
* AnkiNoteBuilder
- * api
*/
class AnkiTemplatesController {
@@ -37,7 +36,7 @@ class AnkiTemplatesController {
}
async prepare() {
- this._defaultFieldTemplates = await api.getDefaultAnkiFieldTemplates();
+ this._defaultFieldTemplates = await yomichan.api.getDefaultAnkiFieldTemplates();
this._fieldTemplatesTextarea = document.querySelector('#anki-card-templates-textarea');
this._compileResultInfo = document.querySelector('#anki-card-templates-compile-result');
@@ -154,7 +153,7 @@ class AnkiTemplatesController {
async _getDefinition(text, optionsContext) {
if (this._cachedDefinitionText !== text) {
- const {definitions} = await api.termsFind(text, {}, optionsContext);
+ const {definitions} = await yomichan.api.termsFind(text, {}, optionsContext);
if (definitions.length === 0) { return null; }
this._cachedDefinitionValue = definitions[0];