FIX: currentUser might be undefined (#9555)

This commit is contained in:
Joffrey JAFFEUX 2020-04-28 07:55:06 +02:00 committed by GitHub
parent d3dc8fc1b3
commit 23ff071ebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -215,8 +215,8 @@ const SiteHeaderComponent = MountWidget.extend(Docking, PanEvents, {
if ( if (
!e.target.closest("#current-user") && !e.target.closest("#current-user") &&
!e.target.closest(".ring-backdrop") && !e.target.closest(".ring-backdrop") &&
!this.currentUser.get("read_first_notification") && !this.get("currentUser.read_first_notification") &&
!this.currentUser.get("enforcedSecondFactor") !this.get("currentUser.enforcedSecondFactor")
) { ) {
this.eventDispatched( this.eventDispatched(
"header:dismiss-first-notification-mask", "header:dismiss-first-notification-mask",

View File

@ -539,7 +539,7 @@ export default createWidget("header", {
"notification", "notification",
{ {
recent: true, recent: true,
silent: this.currentUser.enforcedSecondFactor, silent: this.get("currentUser.enforcedSecondFactor"),
limit: 5 limit: 5
}, },
{ cacheKey: "recent-notifications" } { cacheKey: "recent-notifications" }