only check for https if chunkURL is defined

This commit is contained in:
j 2014-03-05 19:46:28 +00:00
parent 550ced514d
commit 58c36761ba

View file

@ -73,10 +73,10 @@ pandora.chunkupload = function(options) {
maxRetry = response.maxRetry;
}
chunkURL = response.uploadUrl;
if (chunkURL) {
if (document.location.protocol == 'https:') {
chunkURL = chunkURL.replace(/http:\/\//, 'https://');
}
if (chunkURL) {
that.status = 'uploading';
that.progress = 0.0;
// start upload