diff --git a/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml b/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml
index a1a784076bac3..9d46f0ca07d10 100644
--- a/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml
@@ -6,16 +6,15 @@
/** @var \Magento\Customer\Block\CustomerData $block */
?>
-
diff --git a/app/code/Magento/Customer/view/frontend/templates/js/section-config.phtml b/app/code/Magento/Customer/view/frontend/templates/js/section-config.phtml
index e6511a0674e1d..bb0b51fc5ad80 100644
--- a/app/code/Magento/Customer/view/frontend/templates/js/section-config.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/js/section-config.phtml
@@ -6,19 +6,18 @@
/** @var \Magento\Customer\Block\SectionConfig $block */
?>
-
diff --git a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js
index de3ff10bb057b..cc56bb356a66e 100644
--- a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js
+++ b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js
@@ -11,13 +11,13 @@ define([
'underscore',
'ko',
'Magento_Customer/js/section-config',
- 'mage/url',
+ 'module',
'mage/storage',
'jquery/jquery-storageapi'
-], function ($, _, ko, sectionConfig, url) {
+], function ($, _, ko, sectionConfig, module) {
'use strict';
- var options = {},
+ var options = module.config(),
storage,
storageInvalidation,
invalidateCacheBySessionTimeOut,
@@ -26,9 +26,6 @@ define([
buffer,
customerData;
- url.setBaseUrl(window.BASE_URL);
- options.sectionLoadUrl = url.build('customer/section/load');
-
//TODO: remove global change, in this case made for initNamespaceStorage
$.cookieStorage.setConf({
path: '/',
@@ -337,17 +334,15 @@ define([
},
/**
- * @param {Object} settings
* @constructor
*/
- 'Magento_Customer/js/customer-data': function (settings) {
- options = settings;
- invalidateCacheBySessionTimeOut(settings);
- invalidateCacheByCloseCookieSession();
- customerData.init();
- }
+ 'Magento_Customer/js/customer-data': function () {}
};
+ invalidateCacheBySessionTimeOut(options);
+ invalidateCacheByCloseCookieSession();
+ customerData.init();
+
/**
* Events listener
*/
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 d346d5b070729..18fd4ff3de8b3 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
@@ -3,10 +3,15 @@
* See COPYING.txt for license details.
*/
-define(['underscore'], function (_) {
+define(['underscore', 'module'], function (_, module) {
'use strict';
- var baseUrls, sections, clientSideSections, sectionNames, canonize;
+ var options = module.config(),
+ baseUrls = options.baseUrls,
+ sections = options.sections,
+ clientSideSections = options.clientSideSections,
+ sectionNames = options.sectionNames,
+ canonize;
/**
* @param {String} url
@@ -80,14 +85,8 @@ define(['underscore'], function (_) {
},
/**
- * @param {Object} options
* @constructor
*/
- 'Magento_Customer/js/section-config': function (options) {
- baseUrls = options.baseUrls;
- sections = options.sections;
- clientSideSections = options.clientSideSections;
- sectionNames = options.sectionNames;
- }
+ 'Magento_Customer/js/section-config': function () {}
};
});