Skip to content

Commit 73c1f2b

Browse files
authored
Check if attr is undefined in objectiron (Dash-Industry-Forum#5047)
1 parent a5c76f6 commit 73c1f2b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/dash/parser/objectiron.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ function ObjectIron(mappers) {
4747
if (exception) {
4848
for (const [key, values] of Object.entries(exception)) {
4949
let attr = element[key];
50-
if (values.some(v => attr.match(v))) {
50+
if (attr && values.some(v => attr.match(v))) {
5151
allowMapping = false;
5252
}
5353
}
5454
}
5555

5656
return allowMapping;
5757
}
58-
58+
5959
function _conditionallyMapProperty(exception, propertyName, propertyIsArray, propertyElementFromParent, childNode) {
6060
if (_mappingAllowed(propertyElementFromParent, exception)) {
6161
if (childNode[propertyName]) {
@@ -64,7 +64,7 @@ function ObjectIron(mappers) {
6464
childNode[propertyName].push(propertyElementFromParent);
6565
} else {
6666
// non-Array Properties can be:
67-
// - certain elements (e.g. SegmentList, see ISO 23009-1 (6th ed), clause 5.3.9.1) or
67+
// - certain elements (e.g. SegmentList, see ISO 23009-1 (6th ed), clause 5.3.9.1) or
6868
// - attributes (e.g. codecs)
6969
_mergeValues(propertyElementFromParent, childNode[propertyName]);
7070
}

0 commit comments

Comments
 (0)