New better duplicated DOM query counter

This commit is contained in:
Gaël Métais
2014-09-03 14:31:13 +02:00
parent 60a30c594e
commit 87ecb47d3d
+1 -1
View File
@@ -59,7 +59,7 @@ app.controller('ResultsCtrl', function ($scope) {
if ($scope.phantomasResults.offenders.DOMqueriesDuplicated) {
var regex = /^{.*}: (\d+) queries$/;
$scope.phantomasResults.offenders.DOMqueriesDuplicated.forEach(function(query) {
$scope.duplicatedQueriesCountAll += parseInt(regex.exec(query)[1], 10);
$scope.duplicatedQueriesCountAll += parseInt(regex.exec(query)[1], 10) - 1;
});
}