Skip to content

Commit f0aa8ed

Browse files
authored
Update index.js
1 parent c3f0434 commit f0aa8ed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • .github/actions/learning-path-staleness-check

.github/actions/learning-path-staleness-check/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function ValidateLinks(learningPathContents, repoURLToSearch, modifiedPRFiles, l
132132
{
133133
// Clean up the link, determine if it has a line number suffix
134134
let endOfLink = startOfLink + CheckForEndOfLink(learningPathContents, startOfLink)
135-
if (endOfLink === -1) { endOfLink = learningPathContents.length; } // If no illegal characters are found, the link is at the end of the file
135+
if (endOfLink < startOfLink) { endOfLink = learningPathContents.length; } // If no illegal characters are found, the link is at the end of the file
136136

137137
const link = learningPathContents.substring(startOfLink, endOfLink);
138138

0 commit comments

Comments
 (0)