Fix bug on the error reporting

This commit is contained in:
Gaël Métais
2014-08-25 14:19:35 +02:00
parent d8f6780ee4
commit fc457926a5
+1 -1
View File
@@ -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;
}