mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: multiple uploads failed, found while investigating #322
This commit is contained in:
parent
c5cf9fc71d
commit
59857e66e7
1 changed files with 4 additions and 10 deletions
10
vendors/jua/jua.js
vendored
10
vendors/jua/jua.js
vendored
|
|
@ -73,16 +73,10 @@
|
|||
|
||||
class Queue extends Array
|
||||
{
|
||||
constructor(limit) {
|
||||
super();
|
||||
this.limit = parseInt(limit || 0, 10);
|
||||
}
|
||||
push(fn, ...args) {
|
||||
if (this.limit > this.length) {
|
||||
super.push([fn, args]);
|
||||
this.call();
|
||||
}
|
||||
}
|
||||
call() {
|
||||
if (!this.running) {
|
||||
this.running = true;
|
||||
|
|
@ -134,7 +128,7 @@
|
|||
hidden: {},
|
||||
limit: 0
|
||||
}, options || {});
|
||||
self.oQueue = new Queue(1 == options.limit ? 1 : 2);
|
||||
self.oQueue = new Queue();
|
||||
|
||||
if (el) {
|
||||
el.style.position = 'relative';
|
||||
|
|
@ -390,7 +384,7 @@
|
|||
oInput.type = 'file';
|
||||
oInput.tabIndex = -1;
|
||||
oInput.style.display = 'none';
|
||||
oInput.multiple = 1 < limit;
|
||||
oInput.multiple = 1 != limit;
|
||||
|
||||
oClickElement.addEventListener('click', onClick);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue