Fix bug when there are no global variables

This commit is contained in:
Gaël Métais
2014-10-23 14:36:20 +02:00
parent 130ae7d3f8
commit 0083fcf0fc
+3 -1
View File
@@ -13,7 +13,9 @@ app.controller('ResultsCtrl', function ($scope) {
$scope.javascript = JSON.parse($scope.phantomasResults.offenders.javascriptExecutionTree);
// Sort globalVariables offenders alphabetically
$scope.phantomasResults.offenders.globalVariables.sort();
if ($scope.phantomasResults.offenders.globalVariables) {
$scope.phantomasResults.offenders.globalVariables.sort();
}
initSummaryView();