diff --git a/app/code/Magento/Customer/view/frontend/web/js/section-config.js b/app/code/Magento/Customer/view/frontend/web/js/section-config.js index 60482e5fee260..107a177d0832f 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/section-config.js +++ b/app/code/Magento/Customer/view/frontend/web/js/section-config.js @@ -50,7 +50,7 @@ define(['underscore'], function (_) { return route.indexOf(section) === 0; }); - return _.union(actions, sections['*']); + return _.union(_.toArray(actions), sections['*']); }, /** diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/section-config.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/section-config.test.js index 56ed546e28f8c..ef7222883b738 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/section-config.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/section-config.test.js @@ -128,6 +128,21 @@ define(['squire'], function (Squire) { expect(obj.getAffectedSections('http://localhost.com/path')).toEqual(['all']); }); + + it('Ignores capitalization in parts of URL.', function () { + obj['Magento_Customer/js/section-config']({ + sections: { + 'path': [ + 'section' + ] + }, + baseUrls: [ + 'http://localhost.com/' + ] + }); + + expect(obj.getAffectedSections('http://localhost.com/PaTh')).toEqual(['section']); + }); }); describe('"filterClientSideSections" method', function () {