Skip to content

Commit

Permalink
put some curly braces where I like them
Browse files Browse the repository at this point in the history
  • Loading branch information
TerribleDev committed Jan 6, 2016
1 parent fdb0a5c commit c44ed24
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ azurestore.prototype.save = function (image) {
.delay(500) //todo: this was placed here per issue #4 (aka sometimes things 404 right after upload) figure out a better way than just adding a delay
.then(function () {
var urlValue = fileService.getUrl(options.container, uniqueName);

if(!options.cdnUrl)
return urlValue;


if(!options.cdnUrl){
return urlValue;
}

var parsedUrl = url.parse(urlValue, true, true);
var protocol = (options.useHttps ? "https" : "http") + "://";

return protocol + options.cdnUrl + parsedUrl.path;
});
};
Expand All @@ -43,4 +44,4 @@ azurestore.prototype.serve = function () {



module.exports = azurestore;
module.exports = azurestore;

0 comments on commit c44ed24

Please sign in to comment.