null check path when building a pdf download url

if there is an error just the domain is currently returned, empty string
is better for us
This commit is contained in:
Henry Oswald 2018-08-22 16:33:15 +01:00
parent ab1848d0ae
commit cfaa8444db

View file

@ -230,7 +230,7 @@ define [
buildPdfDownloadUrl = (pdfDownloadDomain, path)-> buildPdfDownloadUrl = (pdfDownloadDomain, path)->
#we only download builds from compiles server for security reasons #we only download builds from compiles server for security reasons
if pdfDownloadDomain? and path.indexOf("build") != -1 if pdfDownloadDomain? and path? and path.indexOf("build") != -1
return "#{pdfDownloadDomain}#{path}" return "#{pdfDownloadDomain}#{path}"
else else
return path return path