diff --git a/dashboard-ui/scripts/notificationlist.js b/dashboard-ui/scripts/notificationlist.js index 1e6cd02ec7..7cf2adf175 100644 --- a/dashboard-ui/scripts/notificationlist.js +++ b/dashboard-ui/scripts/notificationlist.js @@ -1,7 +1,10 @@ (function ($, document, Notifications) { - $(document).on("pagebeforeshow", ".page", function () { + $(document).on("pageinit", ".page", function () { + // If there is no user logged in there can be no notifications + if (!Dashboard.getCurrentUserId()) return; + var elem = $(".notificationsList"); var btn = $(".btnMarkReadContainer"); var startIndex = 0;