Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Blair2004 committed Nov 7, 2022
1 parent 50c3412 commit 1682d80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Casts/FloatConvertCasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class FloatConvertCasting implements CastsAttributes
*/
public function get($model, string $key, $value, array $attributes)
{
return ns()->math->set( $value )->toFloat();
return ns()->math->set( $value ?: 0 )->toFloat();
}

/**
Expand Down

0 comments on commit 1682d80

Please sign in to comment.