Skip to content

Commit 1b5f372

Browse files
author
William Duncan
committed
index access check
1 parent fbca009 commit 1b5f372

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gen/docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export function linkType (type: string, config: Config, schema: Schema): string
178178
else {
179179
// if it includes a generic, link the generic
180180
const parts = typeName.match(/<(.*)>/);
181-
if (parts) return `${link(typeName.slice(0, parts.index))}<${fullLink(parts[1])}>`;
181+
if (parts && parts[1]) return `${link(typeName.slice(0, parts.index))}<${fullLink(parts[1])}>`;
182182
}
183183
return link(typeName);
184184
};

0 commit comments

Comments
 (0)