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 4828a0e commit 84a36b5Copy full SHA for 84a36b5
app/code/Magento/Ui/view/base/web/js/lib/core/collection.js
@@ -269,14 +269,12 @@ define([
269
_.each(grouped, this.updateRegion, this);
270
271
_.each(this.regions, function (items) {
272
- var shouldBeEmpty = items.every(function (item) {
273
- return !~_elems.indexOf(item);
274
- });
+ var hasObsoleteComponents = items().length && !_.intersection(_elems, items()).length;
275
276
- if (shouldBeEmpty && items().length) {
+ if (hasObsoleteComponents) {
277
items.removeAll();
278
}
279
- }, this);
+ });
280
281
this.elems(_elems);
282
0 commit comments