Skip to content

Commit

Permalink
ON-41774 # check if repeatable set element value is an empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
divporter committed Jul 10, 2024
1 parent e206422 commit dda628c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed

- check if repeatable set element value is an empty array

## [6.3.0] - 2024-06-21

### Added
Expand Down
5 changes: 5 additions & 0 deletions src/conditionalLogicService/evaluateConditionalPredicate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ export default function evaluateConditionalPredicate({
}
switch (predicate.type) {
case 'VALUE': {
if (Array.isArray(predicateValue)) {
return !predicate.hasValue === !predicateValue.length
? predicateElement
: undefined
}
return !predicate.hasValue === !predicateValue
? predicateElement
: undefined
Expand Down

0 comments on commit dda628c

Please sign in to comment.