diff --git a/lib/util/config_utils.js b/lib/util/config_utils.js index bc6120d2e..223d022c2 100644 --- a/lib/util/config_utils.js +++ b/lib/util/config_utils.js @@ -187,10 +187,6 @@ shaka.util.ConfigUtils = class { return obj && typeof obj === 'object' && !Array.isArray(obj); }; - const isArrayEmpty = (array) => { - return Array.isArray(array) && array.length === 0; - }; - const changes = (object, base) => { return Object.keys(object).reduce((acc, key) => { const value = object[key]; @@ -208,7 +204,7 @@ shaka.util.ConfigUtils = class { acc[key] = diff; } } else if (Array.isArray(value) && Array.isArray(base[key])) { - if (!shaka.util.ArrayUtils.hasSameElements(value, base[key])) { + if (!shaka.util.ArrayUtils.equal(value, base[key])) { acc[key] = value; } } else if (Number.isNaN(value) && Number.isNaN(base[key])) { @@ -228,8 +224,6 @@ shaka.util.ConfigUtils = class { // Do nothing if it's a HTMLElement } else if (isObject(obj[key]) && Object.keys(obj[key]).length === 0) { delete obj[key]; - } else if (isArrayEmpty(obj[key])) { - delete obj[key]; } else if (typeof obj[key] == 'function') { delete obj[key]; } else if (isObject(obj[key])) { diff --git a/test/ui/ui_unit.js b/test/ui/ui_unit.js index d7f6663ea..adefa3ff3 100644 --- a/test/ui/ui_unit.js +++ b/test/ui/ui_unit.js @@ -422,7 +422,7 @@ describe('UI', () => { UiUtils.confirmElementFound(videoContainer, 'shaka-big-buttons-container'); // Small play button - UiUtils.confirmElementMissing(videoContainer, + UiUtils.confirmElementFound(videoContainer, 'shaka-play-button'); // Volume bar UiUtils.confirmElementMissing(controlsButtonPanel,