aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-03-26 19:57:57 -0400
committerGitHub <noreply@github.com>2021-03-26 19:57:57 -0400
commit299720d79955f07cf01577471ac69c5eb5639fbc (patch)
treedcfab66612bf3b5ca96fcc2f55a99048b3eab44f /ext
parent90f7d5ba07340413aa7e43c3a0cc038690b32db3 (diff)
Fix definitionDetails using expression instead of term (#1562)
Diffstat (limited to 'ext')
-rw-r--r--ext/js/background/backend.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index 82457a7e..0fd083bf 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -1717,12 +1717,12 @@ class Backend {
}
async _injectAnkNoteAudio(ankiConnect, timestamp, definitionDetails, details) {
- const {type, expression, reading} = definitionDetails;
+ const {type, term, reading} = definitionDetails;
if (
type === 'kanji' ||
- typeof expression !== 'string' ||
+ typeof term !== 'string' ||
typeof reading !== 'string' ||
- (expression.length === 0 && reading.length === 0)
+ (term.length === 0 && reading.length === 0)
) {
return null;
}
@@ -1734,7 +1734,7 @@ class Backend {
({data, contentType} = await this._audioDownloader.downloadExpressionAudio(
sources,
preferredAudioIndex,
- expression,
+ term,
reading,
{
textToSpeechVoice: null,
@@ -1804,9 +1804,9 @@ class Backend {
break;
default:
{
- const {reading, expression} = definitionDetails;
+ const {reading, term} = definitionDetails;
if (reading) { fileName += `_${reading}`; }
- if (expression) { fileName += `_${expression}`; }
+ if (term) { fileName += `_${term}`; }
}
break;
}