Skip to content

Commit

Permalink
fix: set zero shouldu use only in CanAddr
Browse files Browse the repository at this point in the history
  • Loading branch information
morlay committed Dec 10, 2024
1 parent 0144cc2 commit 1cf5fee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/validator/internal/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ func (va *Pointer) UnmarshalJSONV2(dec *jsontext.Decoder, options json.Options)
}
}

va.SetZero()
if va.CanAddr() {
va.SetZero()
}
return nil
}

Expand Down

0 comments on commit 1cf5fee

Please sign in to comment.