aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/audio.js
diff options
context:
space:
mode:
authorAlex Yatskov <FooSoft@users.noreply.github.com>2017-10-26 09:58:32 -0700
committerGitHub <noreply@github.com>2017-10-26 09:58:32 -0700
commit25ae2e475ab15cbc241818812137c9cf28c2da3a (patch)
treea619a61d068d75850e1cecec63eda391109317e2 /ext/bg/js/audio.js
parent05648b9995955e057af0217f3eaa778a252c5bd7 (diff)
parentab1e2b3d5d79d177d273bb19841615d43cd83df6 (diff)
Merge pull request #95 from siikamiika/feature-merge-similar-results
Feature: result grouping by main dictionary sequence (along with some other changes)
Diffstat (limited to 'ext/bg/js/audio.js')
-rw-r--r--ext/bg/js/audio.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/bg/js/audio.js b/ext/bg/js/audio.js
index ce47490c..549288f5 100644
--- a/ext/bg/js/audio.js
+++ b/ext/bg/js/audio.js
@@ -140,8 +140,13 @@ async function audioInject(definition, fields, mode) {
}
try {
- const url = await audioBuildUrl(definition, mode);
- const filename = audioBuildFilename(definition);
+ let audioSourceDefinition = definition;
+ if (definition.hasOwnProperty('expressions')) {
+ audioSourceDefinition = definition.expressions[0];
+ }
+
+ const url = await audioBuildUrl(audioSourceDefinition, mode);
+ const filename = audioBuildFilename(audioSourceDefinition);
if (url && filename) {
definition.audio = {url, filename};