Skip to content

Commit

Permalink
fix panic for Objects method
Browse files Browse the repository at this point in the history
  • Loading branch information
phuslu committed May 10, 2024
1 parent f3d5880 commit ddb1ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -2050,7 +2050,7 @@ func (e *Entry) Objects(key string, objects any) *Entry {
e.buf = append(e.buf, ',')
}
value := values.Index(i)
if value.IsNil() {
if value.Kind() == reflect.Ptr && value.IsNil() {
e.buf = append(e.buf, "null"...)
} else if obj, ok := value.Interface().(ObjectMarshaler); ok {
i := len(e.buf)
Expand Down

0 comments on commit ddb1ce0

Please sign in to comment.