Fix noteUsesScreenshot not checking mode
This commit is contained in:
parent
32cb1debb5
commit
fa385aafa4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user