Skip to content

Commit a5185d9

Browse files
committed
fix generic nil value
1 parent 86a1f71 commit a5185d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/generic/generic.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ func (v Value) ParseJSON(in any) error {
111111
// @return string
112112
func (v Value) String() string {
113113
var value = v.direct()
114+
if value == nil {
115+
return ""
116+
}
114117
return fmt.Sprint(value)
115118
}
116119

0 commit comments

Comments
 (0)