Просмотр исходного кода

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
Henry Oswald 8 лет назад
Родитель
Сommit
cfaa8444db

+ 1 - 1
services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

@@ -230,7 +230,7 @@ define [
 
 		buildPdfDownloadUrl = (pdfDownloadDomain, path)->
 			 #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}"
 			else
 				return path