Compare commits

..

1 Commits

Author SHA1 Message Date
Yauhen Kashko
e4560e7f29 Add check if _failFilterIndex is a number as 0 always results false in the if condition. 2022-07-31 16:59:40 +02:00
3 changed files with 2 additions and 13896 deletions

View File

@@ -115,7 +115,6 @@ export class FileType {
'3dm': 'image',
mp3: 'audio',
wav: 'audio',
csv: 'xls',
wma: 'audio',
mod: 'audio',
m4a: 'audio',

View File

@@ -117,7 +117,7 @@ export class FileUploader {
this.queue.push(fileItem);
this._onAfterAddingFile(fileItem);
} else {
if (this._failFilterIndex) {
if (typeof this._failFilterIndex === 'number' && this._failFilterIndex >= 0) {
const filter = arrayOfFilters[ this._failFilterIndex ];
this._onWhenAddingFileFailed(temp, filter, options);
}
@@ -434,7 +434,7 @@ export class FileUploader {
this._failFilterIndex = -1;
return !filters.length ? true : filters.every((filter: FilterFunction) => {
if (this._failFilterIndex) {
if (typeof this._failFilterIndex === 'number') {
this._failFilterIndex++;
}

13893
yarn.lock

File diff suppressed because it is too large Load Diff