Skip to content

Commit

Permalink
Add check to make sure line is not undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
k2tzumi committed Oct 12, 2024
1 parent 00ff3d0 commit 9d9c15a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions perf-measures/type-check/scripts/process-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ async function main() {
}
const metrics = []
for await (const line of rl) {
if (line === '')
continue
if (!line || line.trim() === '') continue
const [name, value] = line.split(':')
const unitMatch = value?.trim().match(/^(\d+(\.\d+)?)([a-zA-Z]*)$/)
if (unitMatch) {
Expand Down

0 comments on commit 9d9c15a

Please sign in to comment.