From a297c07bbb96029cf3810b65d9c5d526e76f5548 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Mon, 6 Jun 2016 14:56:34 +0100 Subject: [PATCH] added null check into response.outputFiles? --- .../public/coffee/ide/pdf/controllers/PdfController.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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'