Add specific sub-filters on warnings in the timeline

This commit is contained in:
Gaël Métais
2015-05-22 17:44:54 +02:00
parent 701530ef04
commit 1ff983a03b
6 changed files with 102 additions and 11 deletions
+3 -3
View File
@@ -15,9 +15,7 @@ var jsExecutionTransformer = function() {
queriesWithoutResults: 0
};
var offenders = {
};
var offenders = {};
var hasjQuery = (data.toolsResults.phantomas.metrics.jQueryVersionsLoaded > 0);
if (hasjQuery) {
@@ -53,11 +51,13 @@ var jsExecutionTransformer = function() {
if (node.data.resultsNumber === 0) {
metrics.queriesWithoutResults ++;
node.queryWithoutResults = true;
node.warning = true;
}
if (contextLength === 0) {
metrics.jQueryCallsOnEmptyObject ++;
node.jQueryCallOnEmptyObject = true;
node.warning = true;
}