summaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-12 12:46:32 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-12 12:46:32 -0400
commitebfc7ca945109c6700b3dbf6d45542ddbba94f3d (patch)
treeaf92e74ef4dbff20671c7d9a904c0d2775e9466d /ext/bg/js/backend.js
parent37c374fb633a5b2f224348a8e5490f0275d348e7 (diff)
Pass anki reference to AnkiNoteBuilder constructor
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 24a16199..6a6819e9 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -56,6 +56,7 @@ class Backend {
this.audioSystem = new AudioSystem({getAudioUri: this._getAudioUri.bind(this)});
this.audioUriBuilder = new AudioUriBuilder();
this.ankiNoteBuilder = new AnkiNoteBuilder({
+ anki: this.anki,
audioSystem: this.audioSystem,
renderTemplate: this._renderTemplate.bind(this)
});
@@ -482,8 +483,7 @@ class Backend {
await this.ankiNoteBuilder.injectScreenshot(
definition,
options.anki.terms.fields,
- details.screenshot,
- this.anki
+ details.screenshot
);
}