diff --git a/framework/core/js/src/forum/states/NotificationListState.ts b/framework/core/js/src/forum/states/NotificationListState.ts index cfe214c02..75bb07158 100644 --- a/framework/core/js/src/forum/states/NotificationListState.ts +++ b/framework/core/js/src/forum/states/NotificationListState.ts @@ -15,7 +15,7 @@ export default class NotificationListState extends PaginatedListState { - if (app.session.user.newNotificationCount()) { + if (app.session.user?.newNotificationCount()) { this.pages = []; this.location = { page: 1 }; } @@ -24,7 +24,7 @@ export default class NotificationListState extends PaginatedListState { page.items.forEach((notification) => notification.pushAttributes({ isRead: true }));