diff --git a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee index ea80977fe7..c6b4faf9ab 100644 --- a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee +++ b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee @@ -50,8 +50,9 @@ define [ # make a cache to look up files by name fileByPath = {} - for file in response.outputFiles - fileByPath[file.path] = file + if response?.outputFiles? + for file in response?.outputFiles + fileByPath[file.path] = file if response.status == "timedout" $scope.pdf.view = 'errors'