Fix bug when there are no global variables
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user