From fa653b37439b3e9bf2173a50ad39ce3070ac8191 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 22 Feb 2016 21:48:51 +0100 Subject: [PATCH] Remove content if no session exists. --- .../app/controllers/widget/online_notification.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/app/controllers/widget/online_notification.coffee b/app/assets/javascripts/app/controllers/widget/online_notification.coffee index 73e4e0651..fa1537d5c 100644 --- a/app/assets/javascripts/app/controllers/widget/online_notification.coffee +++ b/app/assets/javascripts/app/controllers/widget/online_notification.coffee @@ -115,6 +115,10 @@ class App.OnlineNotificationWidget extends App.Controller App.OnlineNotification.fetchFull(load) updateContent: => + if !@Session.get() + $('.js-notificationsContainer .popover-content').html('') + return + items = App.OnlineNotification.search(sortBy: 'created_at', order: 'DESC') counter = 0 for item in items