Fix NPE in notifications service

This commit is contained in:
Joseph Schorr 2015-05-26 13:46:41 -04:00
parent d1fa155eee
commit 58685f02cd

View file

@ -196,6 +196,10 @@ function($rootScope, $interval, UserService, ApiService, StringBuilderService, P
}; };
notificationService.getClasses = function(notifications) { notificationService.getClasses = function(notifications) {
if (!notifications.length) {
return '';
}
var classes = []; var classes = [];
for (var i = 0; i < notifications.length; ++i) { for (var i = 0; i < notifications.length; ++i) {
var notification = notifications[i]; var notification = notifications[i];