We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd7e38b commit c37fc3eCopy full SHA for c37fc3e
lib/web/mage/utils/objects.js
@@ -148,7 +148,18 @@ define([
148
separator = separator || '.';
149
result = result || {};
150
151
- _.each(data, function (node, name) {
+ if(!data) {
152
+ return result;
153
+ }
154
+
155
+ // UnderscoreJS each breaks when an object has a length property so we use Object.keys
156
+ _.each(Object.keys(data), function (name) {
157
+ var node = data[name];
158
159
+ if ({}.toString.call(node) === '[object Function]') {
160
+ return;
161
162
163
if (parent) {
164
name = parent + separator + name;
165
}
@@ -436,3 +447,4 @@ define([
436
447
437
448
};
438
449
});
450
0 commit comments