Skip to content

Commit

Permalink
fix: deligate
Browse files Browse the repository at this point in the history
  • Loading branch information
abyssparanoia committed Aug 11, 2023
1 parent 9bff289 commit 473d434
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/pkg/nullable/nullable.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ func TypeFrom[T any](v T) Type[T] {

func TypeFromPtr[T any](v *T) Type[T] {
if v == nil {
return NewType(*v, false)
var zeroValue T
return NewType(zeroValue, false)
}
return NewType(*v, true)
}
Expand Down

0 comments on commit 473d434

Please sign in to comment.