Skip to content

Commit d1fac29

Browse files
committed
Refactor array check in convertValues function to use Array.isArray in order to avoid matching a string
1 parent 72a3fd8 commit d1fac29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typescriptify/typescriptify.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const (
2121
if (!a) {
2222
return a;
2323
}
24-
if (a.slice) {
24+
if (Array.isArray(a)) {
2525
return (a as any[]).map(elem => this.convertValues(elem, classs));
2626
} else if ("object" === typeof a) {
2727
if (asMap) {

0 commit comments

Comments
 (0)