Skip to content

Commit 8bda956

Browse files
author
Lukasz Borowiec
committed
#422: Adding Conditions Combination to Conditions Filter Will Cause Server Errors, Condition Filter to Break, & Infinite Loading Mask - Fixes for Static Tests
1 parent a835b39 commit 8bda956

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/form/provider/conditions-data-processor.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ define([
3030
}
3131
});
3232

33-
/*
34-
* The Combine Condition rule needs to have children,
35-
* if does not have, we cannot parse the rule in the backend.
36-
*/
33+
/*
34+
* The Combine Condition rule needs to have children,
35+
* if does not have, we cannot parse the rule in the backend.
36+
*/
3737
_.each(pairs, function (element, key) {
38-
if ((element === 'Magento\\CatalogWidget\\Model\\Rule\\Condition\\Combine')
39-
// Check if The Combine Condition Rule has children
40-
&& pairs['parameters[condition_source][' + key.match(/([\d?-])+/g)[0] + '--1][type]'] === undefined) {
41-
pairs[key] = '';
42-
}
38+
if (typeof key.match(/([\d?-])+/g) === 'object') {
39+
if ((element === 'Magento\\CatalogWidget\\Model\\Rule\\Condition\\Combine') && (pairs['parameters[condition_source][' + key.match(/([\d?-])+/g)[0] + '--1][type]'] === undefined)) {
40+
pairs[key] = '';
41+
}
42+
}
4343
});
4444

4545
/*

0 commit comments

Comments
 (0)