Skip to content

Commit

Permalink
Merge pull request #88 from oneblink/ON-41774
Browse files Browse the repository at this point in the history
ON-41774 # check if repeatable set element value is an empty array
  • Loading branch information
divporter authored Jul 10, 2024
2 parents e206422 + dda628c commit 8f7a637
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 8f7a637

Please sign in to comment.