diff --git a/public/table-sort.js b/public/table-sort.js index 459d2a9..4970cbc 100644 --- a/public/table-sort.js +++ b/public/table-sort.js @@ -76,6 +76,9 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) { let tableColumnLength = th.parentElement.childElementCount; const threshold = Math.floor(tableColumnLength / 2); for (let tr of tableRows) { + if (regexNotFoundCount >= threshold) { + break; + } let matches = { runtime: null, filesize: null, @@ -89,9 +92,6 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) { matches.dmyDates = tableColumn.innerText.match(datesRegex); matches.ymdDates = tableColumn.innerText.match(regexISODates); } - if (regexNotFoundCount >= threshold) { - break; - } if (Object.values(matches).every((match) => match === null)) { regexNotFoundCount++; continue;