@hmcts/ccd-case-ui-toolkit 6.13.9 → 6.13.10-show-condition-fix

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11250,7 +11250,9 @@
11250
11250
  var search = fieldId + '.';
11251
11251
  var searchRegExp = new RegExp(search, 'g');
11252
11252
  var replaceWith = '';
11253
- cond = ShowCondition.getInstance(field.show_condition.replace(searchRegExp, replaceWith));
11253
+ var condition = field.show_condition.replace(searchRegExp, replaceWith);
11254
+ var isValidCondition = condition.split('"').length % 2 === 0;
11255
+ cond = ShowCondition.getInstance(isValidCondition ? field.show_condition : condition);
11254
11256
  }
11255
11257
  else {
11256
11258
  cond = ShowCondition.getInstance(field.show_condition);