Przeglądaj źródła

Fix bug on the error reporting

Gaël Métais 11 lat temu
rodzic
commit
fc457926a5
1 zmienionych plików z 1 dodań i 1 usunięć
  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');
                 console.log('Returning from Phantomas');
 
 
                 // Adding some YellowLabTools errors here
                 // Adding some YellowLabTools errors here
-                if (!json.metrics.javascriptExecutionTree) {
+                if (!json || !json.metrics || !json.metrics.javascriptExecutionTree) {
                     err = 1001;
                     err = 1001;
                 }
                 }