Browse Source

Fix bug on the error reporting

Gaël Métais 11 years ago
parent
commit
fc457926a5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/lib/phantomasWrapper.js

+ 1 - 1
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;
                 }