From fc457926a5788604afd4088617ff7428bbb4e80b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Mon, 25 Aug 2014 14:19:35 +0200 Subject: [PATCH] Fix bug on the error reporting --- app/lib/phantomasWrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/phantomasWrapper.js b/app/lib/phantomasWrapper.js index 69fd545..21885df 100644 --- a/app/lib/phantomasWrapper.js +++ b/app/lib/phantomasWrapper.js @@ -74,7 +74,7 @@ var PhantomasWrapper = function() { console.log('Returning from Phantomas'); // Adding some YellowLabTools errors here - if (!json.metrics.javascriptExecutionTree) { + if (!json || !json.metrics || !json.metrics.javascriptExecutionTree) { err = 1001; }