From 578b62b4a8d3d7b97a4e2d2b748328b6d1ad38c6 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 26 May 2015 13:46:41 -0400 Subject: [PATCH] Fix NPE in notifications service --- static/js/services/notification-service.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/services/notification-service.js b/static/js/services/notification-service.js index ade256a63..47eddfd2b 100644 --- a/static/js/services/notification-service.js +++ b/static/js/services/notification-service.js @@ -196,6 +196,10 @@ function($rootScope, $interval, UserService, ApiService, StringBuilderService, P }; notificationService.getClasses = function(notifications) { + if (!notifications.length) { + return ''; + } + var classes = []; for (var i = 0; i < notifications.length; ++i) { var notification = notifications[i];