Skip to content

Commit c8310ed

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 e093c03 commit c8310ed

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

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

0 commit comments

Comments
 (0)