Skip to content

Commit 954cf0b

Browse files
pec9399boneskull
authored andcommitted
Fix HTMLCollection iteration to make unhide function work as expected (#4051)
1 parent 816dc27 commit 954cf0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: lib/reporters/html.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ function hideSuitesWithout(classname) {
357357
*/
358358
function unhide() {
359359
var els = document.getElementsByClassName('suite hidden');
360-
for (var i = 0; i < els.length; ++i) {
361-
els[i].className = els[i].className.replace('suite hidden', 'suite');
360+
while (els.length > 0) {
361+
els[0].className = els[0].className.replace('suite hidden', 'suite');
362362
}
363363
}
364364

0 commit comments

Comments
 (0)