diff --git a/src/dash-playlist-loader.js b/src/dash-playlist-loader.js index 6d988690a..623a8178c 100644 --- a/src/dash-playlist-loader.js +++ b/src/dash-playlist-loader.js @@ -145,7 +145,7 @@ export const parseMainXml = ({ */ const removeOldMediaGroupLabels = (update, newMain) => { forEachMediaGroup(update, (properties, type, group, label) => { - if (!(label in newMain.mediaGroups[type][group])) { + if (!newMain.mediaGroups[type][group] || !(label in newMain.mediaGroups[type][group])) { delete update.mediaGroups[type][group][label]; } });