From 58c36761ba7d9048a52b4b776e32a1f69a51f0b3 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 5 Mar 2014 19:46:28 +0000 Subject: [PATCH] only check for https if chunkURL is defined --- static/js/chunkupload.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/chunkupload.js b/static/js/chunkupload.js index 91e836e25..fc598e8f0 100644 --- a/static/js/chunkupload.js +++ b/static/js/chunkupload.js @@ -73,10 +73,10 @@ pandora.chunkupload = function(options) { maxRetry = response.maxRetry; } chunkURL = response.uploadUrl; - if (document.location.protocol == 'https:') { - chunkURL = chunkURL.replace(/http:\/\//, 'https://'); - } if (chunkURL) { + if (document.location.protocol == 'https:') { + chunkURL = chunkURL.replace(/http:\/\//, 'https://'); + } that.status = 'uploading'; that.progress = 0.0; // start upload