Skip to content

Commit f983124

Browse files
jpuriGudahtt
andauthored
Update src/utils/common.ts
Co-authored-by: Mark Stacey <[email protected]>
1 parent d0495dc commit f983124

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* @returns Parameter string with array brackets [] removed.
66
*/
77
export const stripArrayTypeIfPresent = (typeString: string) => {
8-
if (typeString?.match(/\S\s*\[\]$/u) !== null) {
9-
return typeString.replace(/\s*\[\]$/gu, '').trim();
8+
if (typeString?.match(/\S\[\]$/u) !== null) {
9+
return typeString.replace(/\[\]$/gu, '').trim();
1010
}
1111
return typeString;
1212
};

0 commit comments

Comments
 (0)