Skip to content

Commit

Permalink
check if option has value differently
Browse files Browse the repository at this point in the history
  • Loading branch information
i-just committed Jan 16, 2024
1 parent 6f018da commit 6ceb924
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fields/conditions/OptionsFieldConditionRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function options(): array
/** @var BaseOptionsField $field */
$field = $this->field();
return Collection::make($field->options)
->filter(fn(array $option) => !empty($option['value']) && !empty($option['label']))
->filter(fn(array $option) => $option['value'] !== null && $option['value'] !== '' && !empty($option['label']))
->map(fn(array $option) => [
'value' => $option['value'],
'label' => $option['label'],
Expand Down

0 comments on commit 6ceb924

Please sign in to comment.