Skip to content

Commit ea72c16

Browse files
author
Denys Rul
committed
MAGETWO-33932: Add ability to initialize modules by selector
- Fix typo
1 parent b0404ff commit ea72c16

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

lib/web/mage/apply/scripts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ define([
88
], function (_, $) {
99
'use strict';
1010

11-
var scriptSelecotr = 'script[type="text/x-magento-init"]',
11+
var scriptSelector = 'script[type="text/x-magento-init"]',
1212
virtual = [];
1313

1414
/**
@@ -71,7 +71,7 @@ define([
7171

7272
parent = parent || document.body;
7373

74-
elems = document.querySelectorAll(scriptSelecotr);
74+
elems = document.querySelectorAll(scriptSelector);
7575

7676
return _.toArray(elems);
7777
}

lib/web/mage/bootstrap.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,15 @@
22
* Copyright © 2015 Magento. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
/*jshint jquery:true browser:true */
65
define([
7-
"jquery",
8-
"mage/apply/main"
9-
], function($, mage){
6+
'jquery',
7+
'mage/apply/main'
8+
], function ($, mage) {
109
'use strict';
11-
10+
1211
$.ajaxSetup({
1312
cache: false
1413
});
1514

16-
var bootstrap = function() {
17-
/**
18-
* Init all components defined via data-mage-init attribute
19-
* and subscribe init action to contentUpdated event
20-
*/
21-
mage.apply();
22-
};
23-
24-
$(bootstrap);
15+
$(mage.apply);
2516
});

0 commit comments

Comments
 (0)