Better DOM duplicated queries handling

This commit is contained in:
Gaël Métais
2014-09-05 12:05:00 +02:00
parent 2829c8de38
commit 45a9abebe3
2 changed files with 2 additions and 9 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ app.controller('ResultsCtrl', function ($scope) {
// Read all the duplicated queries and calculate a more appropriated score
$scope.duplicatedQueriesCountAll = 0;
if ($scope.phantomasResults.offenders.DOMqueriesDuplicated) {
var regex = /^{.*}: *(\d+) queries$/;
var regex = /\): *(\d+) queries$/;
$scope.phantomasResults.offenders.DOMqueriesDuplicated.forEach(function(query) {
var regexResult = regex.exec(query);
if (regexResult) {