Skip to content

Commit cd5021f

Browse files
authored
Merge pull request #23 from benoitkugler/master
smarter nullable array
2 parents 86675a8 + 0dea540 commit cd5021f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

s2ts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (s *StructToTS) addTypeFields(out *Struct, t reflect.Type) {
106106
}
107107

108108
case k == reflect.Slice, k == reflect.Array:
109-
tf.CanBeNull = true
109+
tf.CanBeNull = k == reflect.Slice
110110
tf.TsType, tf.ValType = "array", stripType(sft.Elem())
111111

112112
if isStruct(sft.Elem()) {

0 commit comments

Comments
 (0)