diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-25 22:24:22 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-25 22:24:22 -0500 |
commit | fa385aafa4cf1b0101b6bc0a08f38b8508666158 (patch) | |
tree | 59f987bd31f38d2f57f34ceeac5950f3936c819b /ext/mixed | |
parent | 32cb1debb52624eb458b1fa19fc10325b386605a (diff) |
Fix noteUsesScreenshot not checking mode
Diffstat (limited to 'ext/mixed')
-rw-r--r-- | ext/mixed/js/display.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index b0bcff7c..8a68b43f 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -633,7 +633,7 @@ class Display { this.setSpinnerVisible(true); const context = {}; - if (this.noteUsesScreenshot()) { + if (this.noteUsesScreenshot(mode)) { const screenshot = await this.getScreenshot(); if (screenshot) { context.screenshot = screenshot; @@ -703,8 +703,9 @@ class Display { } } - noteUsesScreenshot() { - const fields = this.options.anki.terms.fields; + noteUsesScreenshot(mode) { + const optionsAnki = this.options.anki; + const fields = (mode === 'kanji' ? optionsAnki.kanji : optionsAnki.terms).fields; for (const fieldValue of Object.values(fields)) { if (fieldValue.includes('{screenshot}')) { return true; |