Skip to content

Commit f84c2e6

Browse files
authored
Fix moreThanAHyperlink check on 1-line commits
1 parent 7c3c018 commit f84c2e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/commit-lint.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ export class LintCommit {
131131
// Hyperlink validation is NOT part of the test.
132132

133133
private moreThanAHyperlink(): void {
134+
if (this.lines.length < 3)
135+
return;
136+
134137
const line = this.lines[2];
135138
const match = line.match(/^(\w*)\s*https*:\/\/\S+\s*(\w*)/);
136139

0 commit comments

Comments
 (0)