Przeglądaj źródła

New better duplicated DOM query counter

Gaël Métais 10 lat temu
rodzic
commit
87ecb47d3d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/public/scripts/resultsCtrl.js

+ 1 - 1
app/public/scripts/resultsCtrl.js

@@ -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;
             });
         }