Skip to content

Commit e093c03

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 2c9ae61 commit e093c03

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ define([
3535
* if does not have, we cannot parse the rule in the backend.
3636
*/
3737
_.each(pairs, function (element, key) {
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)) {
38+
var keyIds = key.match(/[\d?-]+/g);
39+
40+
if (typeof keyIds === 'object') {
41+
var nexPairsExist = pairs['parameters[condition_source][' + keyIds[0] + '--1][type]'];
42+
43+
if ((element === 'Magento\\CatalogWidget\\Model\\Rule\\Condition\\Combine') && (nexPairsExist === undefined)) {
4044
pairs[key] = '';
4145
}
4246
}

0 commit comments

Comments
 (0)