Use Array.isArray instead of hasOwn
This commit is contained in:
parent
1f62dfa572
commit
cae8ed2767
@ -168,10 +168,8 @@ async function audioInject(definition, fields, sources, optionsContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let audioSourceDefinition = definition;
|
const expressions = definition.expressions;
|
||||||
if (hasOwn(definition, 'expressions')) {
|
const audioSourceDefinition = Array.isArray(expressions) ? expressions[0] : definition;
|
||||||
audioSourceDefinition = definition.expressions[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
const {url} = await audioGetFromSources(audioSourceDefinition, sources, optionsContext, true);
|
const {url} = await audioGetFromSources(audioSourceDefinition, sources, optionsContext, true);
|
||||||
if (url !== null) {
|
if (url !== null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user