Skip to content

Commit ffc03db

Browse files
committed
Fix loop benchmark
1 parent a79e000 commit ffc03db

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/node_modules/@stdlib/iter/length/benchmark/benchmark.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ bench( pkg+'::loop', function benchmark( b ) {
103103
count = 0;
104104
while ( v && !v.done ) {
105105
v = arr.next();
106+
if ( v.done ) {
107+
break;
108+
}
106109
count += 1;
107110
}
108111
if ( count !== values.length ) {

0 commit comments

Comments
 (0)