mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: currentUser might be undefined (#9555)
This commit is contained in:
parent
d3dc8fc1b3
commit
23ff071ebd
@ -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",
|
||||||
|
@ -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" }
|
||||||
|
Loading…
Reference in New Issue
Block a user