浏览代码

Fix bug on the error reporting

Gaël Métais 11 年之前
父节点
当前提交
fc457926a5
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;
                 }