Skip to content

Commit 98183e7

Browse files
committed
Fix primary type regex match condition for types signatures
1 parent 9db63df commit 98183e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/common.ts

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

0 commit comments

Comments
 (0)