From 7bd8f715bc580a6852d23e2adf200536ee1b9a4d Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 6 Jun 2019 09:39:59 +0800 Subject: [PATCH] DEV: Prefer `this.site.notification_types`. --- .../javascripts/discourse/widgets/notification-item.js.es6 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/widgets/notification-item.js.es6 b/app/assets/javascripts/discourse/widgets/notification-item.js.es6 index e89eeb210a0..eac0c6e6995 100644 --- a/app/assets/javascripts/discourse/widgets/notification-item.js.es6 +++ b/app/assets/javascripts/discourse/widgets/notification-item.js.es6 @@ -30,7 +30,7 @@ createWidget("notification-item", { url() { const attrs = this.attrs; const data = attrs.data; - const notificationTypes = this.site.get("notification_types"); + const notificationTypes = this.site.notification_types; const badgeId = data.badge_id; if (badgeId) { @@ -93,7 +93,7 @@ createWidget("notification-item", { if ( this.attrs.notification_type === - this.site.get("notification_types").liked_consolidated + this.site.notification_types.liked_consolidated ) { title = I18n.t("notifications.liked_consolidated_description", { count: parseInt(data.count) @@ -111,7 +111,7 @@ createWidget("notification-item", { const scope = notName === "custom" ? data.message : `notifications.${notName}`; - const notificationTypes = this.site.get("notification_types"); + const notificationTypes = this.site.notification_types; if (notificationType === notificationTypes.group_message_summary) { const count = data.inbox_count;