Преглед изворни кода

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 година
родитељ
комит
cfaa8444db
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

+ 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