Skip to content

Commit 8a4fc0b

Browse files
committed
fixed #1717
1 parent 750068e commit 8a4fc0b

17 files changed

+46
-36
lines changed

demo/src/main/webapp/js/FileAPI.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/main/webapp/js/ng-file-upload-all.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* progress, resize, thumbnail, preview, validation and CORS
44
* FileAPI Flash shim for old browsers not supporting FormData
55
* @author Danial <[email protected]>
6-
* @version 12.2.9
6+
* @version 12.2.10
77
*/
88

99
(function () {
@@ -424,7 +424,7 @@ if (!window.FileReader) {
424424
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
425425
* progress, resize, thumbnail, preview, validation and CORS
426426
* @author Danial <[email protected]>
427-
* @version 12.2.9
427+
* @version 12.2.10
428428
*/
429429

430430
if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
@@ -445,7 +445,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
445445

446446
var ngFileUpload = angular.module('ngFileUpload', []);
447447

448-
ngFileUpload.version = '12.2.9';
448+
ngFileUpload.version = '12.2.10';
449449

450450
ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
451451
var upload = this;
@@ -1812,11 +1812,13 @@ ngFileUpload.service('UploadValidate', ['UploadDataUrl', '$q', '$timeout', funct
18121812
invalidFiles.push(file);
18131813
}
18141814
if (!runAllValidation) {
1815-
files.splice(files.indexOf(file), 1);
1815+
var i = files.indexOf(file);
1816+
if (i > -1) files.splice(i, 1);
18161817
}
18171818
defer.resolve(false);
18181819
} else {
1819-
files.splice(files.indexOf(file), 1);
1820+
var j = files.indexOf(file);
1821+
if (j > -1) files.splice(j, 1);
18201822
defer.resolve(true);
18211823
}
18221824
} else {

demo/src/main/webapp/js/ng-file-upload-all.min.js

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

demo/src/main/webapp/js/ng-file-upload-shim.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* progress, resize, thumbnail, preview, validation and CORS
44
* FileAPI Flash shim for old browsers not supporting FormData
55
* @author Danial <[email protected]>
6-
* @version 12.2.9
6+
* @version 12.2.10
77
*/
88

99
(function () {

demo/src/main/webapp/js/ng-file-upload-shim.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/main/webapp/js/ng-file-upload.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
33
* progress, resize, thumbnail, preview, validation and CORS
44
* @author Danial <[email protected]>
5-
* @version 12.2.9
5+
* @version 12.2.10
66
*/
77

88
if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
@@ -23,7 +23,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
2323

2424
var ngFileUpload = angular.module('ngFileUpload', []);
2525

26-
ngFileUpload.version = '12.2.9';
26+
ngFileUpload.version = '12.2.10';
2727

2828
ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
2929
var upload = this;
@@ -1390,11 +1390,13 @@ ngFileUpload.service('UploadValidate', ['UploadDataUrl', '$q', '$timeout', funct
13901390
invalidFiles.push(file);
13911391
}
13921392
if (!runAllValidation) {
1393-
files.splice(files.indexOf(file), 1);
1393+
var i = files.indexOf(file);
1394+
if (i > -1) files.splice(i, 1);
13941395
}
13951396
defer.resolve(false);
13961397
} else {
1397-
files.splice(files.indexOf(file), 1);
1398+
var j = files.indexOf(file);
1399+
if (j > -1) files.splice(j, 1);
13981400
defer.resolve(true);
13991401
}
14001402
} else {

demo/src/main/webapp/js/ng-file-upload.min.js

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

dist/FileAPI.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ng-file-upload-all.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* progress, resize, thumbnail, preview, validation and CORS
44
* FileAPI Flash shim for old browsers not supporting FormData
55
* @author Danial <[email protected]>
6-
* @version 12.2.9
6+
* @version 12.2.10
77
*/
88

99
(function () {
@@ -424,7 +424,7 @@ if (!window.FileReader) {
424424
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
425425
* progress, resize, thumbnail, preview, validation and CORS
426426
* @author Danial <[email protected]>
427-
* @version 12.2.9
427+
* @version 12.2.10
428428
*/
429429

430430
if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
@@ -445,7 +445,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
445445

446446
var ngFileUpload = angular.module('ngFileUpload', []);
447447

448-
ngFileUpload.version = '12.2.9';
448+
ngFileUpload.version = '12.2.10';
449449

450450
ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
451451
var upload = this;
@@ -1812,11 +1812,13 @@ ngFileUpload.service('UploadValidate', ['UploadDataUrl', '$q', '$timeout', funct
18121812
invalidFiles.push(file);
18131813
}
18141814
if (!runAllValidation) {
1815-
files.splice(files.indexOf(file), 1);
1815+
var i = files.indexOf(file);
1816+
if (i > -1) files.splice(i, 1);
18161817
}
18171818
defer.resolve(false);
18181819
} else {
1819-
files.splice(files.indexOf(file), 1);
1820+
var j = files.indexOf(file);
1821+
if (j > -1) files.splice(j, 1);
18201822
defer.resolve(true);
18211823
}
18221824
} else {

dist/ng-file-upload-all.min.js

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

0 commit comments

Comments
 (0)