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 {
|
||||
let audioSourceDefinition = definition;
|
||||
if (hasOwn(definition, 'expressions')) {
|
||||
audioSourceDefinition = definition.expressions[0];
|
||||
}
|
||||
const expressions = definition.expressions;
|
||||
const audioSourceDefinition = Array.isArray(expressions) ? expressions[0] : definition;
|
||||
|
||||
const {url} = await audioGetFromSources(audioSourceDefinition, sources, optionsContext, true);
|
||||
if (url !== null) {
|
||||
|
Loading…
Reference in New Issue
Block a user