Skip to content

Commit fa128a3

Browse files
committed
Remove timeout around chunk creation and push to chunks array
- fixes 23#567
1 parent 2d5e06b commit fa128a3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

resumable.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,10 +559,8 @@
559559
var round = $.getOpt('forceChunkSize') ? Math.ceil : Math.floor;
560560
var maxOffset = Math.max(round($.file.size/$.getOpt('chunkSize')),1);
561561
for (var offset=0; offset<maxOffset; offset++) {(function(offset){
562-
window.setTimeout(function(){
563-
$.chunks.push(new ResumableChunk($.resumableObj, $, offset, chunkEvent));
564-
$.resumableObj.fire('chunkingProgress',$,offset/maxOffset);
565-
},0);
562+
$.chunks.push(new ResumableChunk($.resumableObj, $, offset, chunkEvent));
563+
$.resumableObj.fire('chunkingProgress',$,offset/maxOffset);
566564
})(offset)}
567565
window.setTimeout(function(){
568566
$.resumableObj.fire('chunkingComplete',$);

0 commit comments

Comments
 (0)