Skip to content

Commit

Permalink
Return null for non numeric values when dehydrating states. Should pr…
Browse files Browse the repository at this point in the history
…operly fix #18
  • Loading branch information
pelmered committed Apr 24, 2024
1 parent e763d2e commit df8892b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Forms/Components/MoneyInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ protected function setUp(): void
$currency = $component->getCurrency();
$state = MoneyFormatter::parseDecimal($state, $currency, $component->getLocale());

if (empty($state)) {
if (!is_numeric($state)) {
return null;
}

return $state;
});
}
Expand Down

0 comments on commit df8892b

Please sign in to comment.