Prevents from push on undefined elements

This commit is contained in:
Jesús Ángel González 2018-01-29 12:38:16 +01:00 committed by Javier Castro
parent 5b97e7299d
commit 75e3f3588f

View File

@ -81,6 +81,7 @@ var app = require('ui/modules').get('apps/webinar_app', [])
}
}
if(typeof $rootScope.loadedVisualizations === 'undefined') $rootScope.loadedVisualizations = [];
$rootScope.loadedVisualizations.push(true);
$rootScope.loadingStatus = `Rendering visualizations... ${Math.round((100 * $rootScope.loadedVisualizations.length / $rootScope.tabVisualizations[$location.search().tab]) * 100) / 100} %`;
if ($rootScope.loadedVisualizations.length >= $rootScope.tabVisualizations[$location.search().tab]) {