Skip to content

Commit 5d54e7d

Browse files
committed
fix(URLExtract): Add support for array
1 parent 8cbe543 commit 5d54e7d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/Common/Core/URLExtract/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ function toNativeType(str) {
1111
return false;
1212
} else if (str === undefined || str === 'undefined') {
1313
return undefined;
14+
} else if (str[0] === '[' && str[str.length - 1] === ']') {
15+
return str
16+
.substring(1, str.length - 1)
17+
.split(',')
18+
.map((s) => toNativeType(s.trim()));
1419
} else if (str === '' || Number.isNaN(Number(str))) {
1520
return str;
1621
}

0 commit comments

Comments
 (0)