Fix type xml issue

This commit is contained in:
Gaël Métais
2015-06-24 08:01:58 +02:00
parent 30ae0f93f3
commit 87adc575ac
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -155,6 +155,7 @@ var WeightChecker = function() {
requests.forEach(function(req) {
var weight = ((typeof req.weightCheck.bodySize === 'number') ? req.weightCheck.bodySize + req.weightCheck.headersSize : req.contentLength) || 0;
var type = req.type || 'other';
type = (results.byType[type]) ? type : 'other';
results.totalWeight += weight;
results.byType[type].totalWeight += weight;
@@ -275,6 +276,8 @@ var WeightChecker = function() {
requests.forEach(function(req) {
if (req.url !== 'about:blank') {
var type = req.type || 'other';
type = (results.byType[type]) ? type : 'other';
results.byType[type].push(req.url);
results.total ++;
}