File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,19 +188,7 @@ function* streamBatchedDrawablePatterns({
188188 patterns : [ ] ,
189189 }
190190
191- while ( true ) {
192- const iteratorResult = drawQueueIterator . next ( )
193-
194- if ( iteratorResult . done ) {
195- if ( chunk . patterns . length > 0 ) {
196- yield chunk
197- }
198-
199- break
200- }
201-
202- const entry = iteratorResult . value
203-
191+ for ( const entry of drawQueueIterator ) {
204192 if ( chunk . depth !== entry . depth ) {
205193 if ( chunk . patterns . length > 0 ) {
206194 yield chunk
@@ -212,7 +200,6 @@ function* streamBatchedDrawablePatterns({
212200 }
213201 } else {
214202 chunk . patterns . push ( entry . currentPattern )
215- }
216203
217204 if ( chunk . patterns . length >= chunkSize ) {
218205 yield chunk
@@ -221,6 +208,11 @@ function* streamBatchedDrawablePatterns({
221208 patterns : [ ] ,
222209 }
223210 }
211+ }
212+ }
213+
214+ if ( chunk . patterns . length > 0 ) {
215+ yield chunk
224216 }
225217}
226218
You can’t perform that action at this time.
0 commit comments