Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Commit aef42d0

Browse files
author
rnicholus
committed
fix(upload.handler.controller): missing null-check in send()
1 parent 641577a commit aef42d0

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

client/js/upload-handler/upload.handler.controller.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,14 @@ qq.UploadHandlerController = function(o, namespace) {
393393

394394
simple = {
395395
send: function(id, name) {
396-
handler._getFileState(id).loaded = 0;
396+
var fileState = handler._getFileState(id);
397+
398+
if (!fileState) {
399+
log("Ignoring send request as this upload may have been cancelled, File ID " + id, "warn");
400+
return;
401+
}
402+
403+
fileState.loaded = 0;
397404

398405
log("Sending simple upload request for " + id);
399406
handler.uploadFile(id).then(

client/js/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/*global qq */
2-
qq.version = "5.16.1";
2+
qq.version = "5.16.2";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "Fine Uploader",
44
"main": "lib/traditional.js",
55
"types" : "typescript/fine-uploader.d.ts",
6-
"version": "5.16.1",
6+
"version": "5.16.2",
77
"description": "Multiple file upload plugin with progress-bar, drag-and-drop, direct-to-S3 & Azure uploading, client-side image scaling, preview generation, form support, chunking, auto-resume, and tons of other features.",
88
"keywords": [
99
"amazon",

0 commit comments

Comments
 (0)