Skip to content

Commit 931c5a2

Browse files
committed
fix(ui): walk through errors on hooks
1 parent c23237d commit 931c5a2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ui/cli/Errors.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@ function getNthError(
131131
return undefined
132132
}
133133
const gen = node.errors.grouped()
134-
// eslint-disable-next-line no-cond-assign
135-
for (let i = 0, e; i <= offset && (e = gen.next().value); i++) {
136-
return Array.from(e)
134+
let e
135+
for (let i = 0; i <= offset; i++) {
136+
e = gen.next().value
137137
}
138+
return e && Array.from(e)
138139
}
139140

140141
function nextRunInstance(

0 commit comments

Comments
 (0)