Skip to content

Commit d95271a

Browse files
committed
fix panic
1 parent 9b71ee1 commit d95271a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rules.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,10 @@ func compareFieldsBase(ctx *ValidatorCtx) (SizeCompareStatus, ConvertStatus) {
17321732
}
17331733

17341734
other := ctx.Field(ctx.Args[0])
1735+
if other == nil {
1736+
return 0, Invalid
1737+
}
1738+
17351739
other.UnwrapPointer()
17361740

17371741
if !other.HasValue() {

0 commit comments

Comments
 (0)