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

Commit

Permalink
fix(upload.handler.controller): missing null-check in send()
Browse files Browse the repository at this point in the history
  • Loading branch information
rnicholus committed Apr 10, 2018
1 parent 641577a commit aef42d0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion client/js/upload-handler/upload.handler.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,14 @@ qq.UploadHandlerController = function(o, namespace) {

simple = {
send: function(id, name) {
handler._getFileState(id).loaded = 0;
var fileState = handler._getFileState(id);

if (!fileState) {
log("Ignoring send request as this upload may have been cancelled, File ID " + id, "warn");
return;
}

fileState.loaded = 0;

log("Sending simple upload request for " + id);
handler.uploadFile(id).then(
Expand Down
2 changes: 1 addition & 1 deletion client/js/version.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/*global qq */
qq.version = "5.16.1";
qq.version = "5.16.2";
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Fine Uploader",
"main": "lib/traditional.js",
"types" : "typescript/fine-uploader.d.ts",
"version": "5.16.1",
"version": "5.16.2",
"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.",
"keywords": [
"amazon",
Expand Down

0 comments on commit aef42d0

Please sign in to comment.