Skip to content

Commit 10273a0

Browse files
committed
Added isUploadInProgress() check to beginUpload() method to prevent breaking the queue when multiple beginUpload() calls are made.
1 parent c51809f commit 10273a0

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

jquery.xhruploadqueue.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@
304304
* @public
305305
*/
306306
me.beginUpload = function() {
307+
// do not do anything if an upload is already in progress
308+
if (me.isUploadInProgress()) {
309+
return;
310+
}
307311
options.uploadStart.call(me);
308312
var concurrent = options.uploadConcurrency;
309313
uploadsInProgress = concurrent;

jquery.xhruploadqueue.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)