summaryrefslogtreecommitdiff
path: root/ext/bg/js/audio.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-11-04 08:18:49 -0700
committerAlex Yatskov <alex@foosoft.net>2017-11-04 08:18:49 -0700
commitd505edb94b27ecd8cbaaecd11cbebfbe12b16164 (patch)
tree44ab656f33f7eedb0e4e0c9e31e0ccceffb069e0 /ext/bg/js/audio.js
parent5c0d1cc6dae358dd2c04bdaac8f30cebfad5466d (diff)
parentdcef7ce3774a3dcc8e7bee0bc17398251523451e (diff)
Merge branch 'dev'
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};