Skip to content

Commit 8d1d6f4

Browse files
author
Ihor Melnychenko
committed
MAGETWO-38867: Create mixin for declarative widget description
1 parent a2c0965 commit 8d1d6f4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/web/mage/apply/main.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ define([
4444

4545
_.each(mixins, function (mixin, componentName) {
4646
configStack = itemContainer.data[componentName];
47-
_.each(mixin, function (item) {
48-
require([item], function (fn) {
49-
configStack = fn(configStack, element);
50-
});
47+
require(mixin, function(){
48+
for (var i = 0, l = arguments.length; i < l; i++){
49+
configStack = arguments[i](configStack, element);
50+
}
51+
5152
});
5253
itemContainer.data[componentName] = configStack;
5354
});

0 commit comments

Comments
 (0)