summaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-04-03 09:15:06 -0700
committerAlex Yatskov <alex@foosoft.net>2017-04-03 09:15:06 -0700
commite6b592b4c06ee18017a03bb5148e2c4b64deb146 (patch)
treee3cc98d5ffbe9501d1ad8e6c705a37c6d9c3ee91 /ext/mixed
parentccb740da58068633a0ef5bd1c26bd4dd10625dce (diff)
fix problem creating notes with audio when audio is disabled
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/util.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mixed/js/util.js b/ext/mixed/js/util.js
index edd49873..c05fb679 100644
--- a/ext/mixed/js/util.js
+++ b/ext/mixed/js/util.js
@@ -103,6 +103,10 @@ function audioBuildFilename(definition) {
}
function audioInject(definition, fields, mode) {
+ if (mode === 'disabled') {
+ return Promise.resolve(true);
+ }
+
const filename = audioBuildFilename(definition);
if (!filename) {
return Promise.resolve(true);