Skip to content

Commit

Permalink
fix: filer out empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Waldstein committed Oct 11, 2024
1 parent 74de009 commit f3eed61
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ protected function createNodeFromDonorNameBlock(BlockModel $block): Node


if ($block->hasAttribute('showHonorific') && $block->getAttribute('showHonorific') === true) {
$options = array_values((array)$block->getAttribute('honorifics'));
$options = array_filter(array_values((array)$block->getAttribute('honorifics')));

if (!empty($options)){
$group->getNodeByName('honorific')
->label(__('Title', 'give'))
Expand Down

0 comments on commit f3eed61

Please sign in to comment.