diff --git a/plugins/MultiSites/angularjs/dashboard/dashboard-model.js b/plugins/MultiSites/angularjs/dashboard/dashboard-model.js index 1b64eac69ef7f7a729419d129fe4c7bcdac007e1..bd72e54f6f7d84f02d596da318e0c338021add34 100644 --- a/plugins/MultiSites/angularjs/dashboard/dashboard-model.js +++ b/plugins/MultiSites/angularjs/dashboard/dashboard-model.js @@ -72,7 +72,11 @@ angular.module('piwikApp').factory('multisitesDashboardModel', function (piwikAp { angular.forEach(groups, function (group) { angular.forEach(group.sites, function (site) { - var revenue = (site.revenue+'').match(/(\d+\.?\d*)/); // convert $ 0.00 to 0.00 or 5€ to 5 + var revenue = 0; + if (site.revenue) { + revenue = (site.revenue+'').match(/(\d+\.?\d*)/); // convert $ 0.00 to 0.00 or 5€ to 5 + } + group.nb_visits += parseInt(site.nb_visits, 10); group.nb_pageviews += parseInt(site.nb_pageviews, 10); if (revenue.length) {