Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
dolymood committed May 4, 2018
1 parent d31c7d6 commit 7ce0e67
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions dist/uploader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Uploader - Uploader library implements html5 file upload and provides multiple simultaneous, stable, fault tolerant and resumable uploads
* @version v0.2.1
* @version v0.2.2
* @author dolymood <[email protected]>
* @link https://github.com/simple-uploader/Uploader
* @license MIT
Expand Down Expand Up @@ -351,7 +351,7 @@ var event = _dereq_('./event')
var File = _dereq_('./file')
var Chunk = _dereq_('./chunk')

var version = '0.2.1'
var version = '0.2.2'

// ie10+
var ie10plus = window.navigator.msPointerEnabled
Expand Down Expand Up @@ -607,7 +607,7 @@ utils.extend(Uploader.prototype, {
// All chunks have been uploaded, complete
this._triggerAsync('complete')
}
return false
return outstanding
},

upload: function (preventEvents) {
Expand All @@ -620,6 +620,10 @@ utils.extend(Uploader.prototype, {
var started = false
for (var num = 1; num <= this.opts.simultaneousUploads - ret; num++) {
started = this.uploadNextChunk(!preventEvents) || started
if (!started && preventEvents) {
// completed
break
}
}
if (!started && !preventEvents) {
this._triggerAsync('complete')
Expand Down
Loading

0 comments on commit 7ce0e67

Please sign in to comment.