Skip to content

Commit

Permalink
Update Date.php
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to authored May 22, 2023
1 parent 5018661 commit 3dcc851
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fields/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public function formViewValue(Model $item): mixed
{
$value = parent::formViewValue($item);

if (! $value && $this->isNullable()) {
return '';
if (! $value) {
return $this->isNullable() ? null : '';
}

if ($value instanceof Carbon) {
Expand Down

0 comments on commit 3dcc851

Please sign in to comment.