Skip to content

Commit 83301ab

Browse files
committed
fix potential problem when replacing chunk with itself
1 parent 5161d96 commit 83301ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ChunkGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class ChunkGroup {
9292
if(newIdx < oldIdx) {
9393
this.chunks.splice(oldIdx, 1);
9494
return true;
95-
} else {
95+
} else if(newIdx !== oldIdx) {
9696
this.chunks[oldIdx] = newChunk;
9797
this.chunks.splice(newIdx, 1);
9898
return true;

0 commit comments

Comments
 (0)