Skip to content

Commit 1682d80

Browse files
committed
Update
1 parent 50c3412 commit 1682d80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Casts/FloatConvertCasting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class FloatConvertCasting implements CastsAttributes
1717
*/
1818
public function get($model, string $key, $value, array $attributes)
1919
{
20-
return ns()->math->set( $value )->toFloat();
20+
return ns()->math->set( $value ?: 0 )->toFloat();
2121
}
2222

2323
/**

0 commit comments

Comments
 (0)