Skip to content

Commit

Permalink
getAllInitialChunks really returns all of them
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jun 14, 2021
1 parent ac97a27 commit 9a7cf9a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Chunk.js
Expand Up @@ -598,8 +598,12 @@ class Chunk {
*/
getAllInitialChunks() {
const chunks = new Set();
for (const group of this.groupsIterable) {
for (const c of group.chunks) chunks.add(c);
const queue = new Set(this.groupsIterable);
for (const group of queue) {
if (group.isInitial()) {
for (const c of group.chunks) chunks.add(c);
for (const g of group.childrenIterable) queue.add(g);
}
}
return chunks;
}
Expand Down

0 comments on commit 9a7cf9a

Please sign in to comment.