summaryrefslogtreecommitdiff
path: root/app/helpers/notifications_helper.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2019-08-23 22:01:11 +0000
committer🤖 GitLab Bot 🤖 <gitlab-bot@gitlab.com>2019-08-23 22:19:56 +0000
commit913aff3ce27a7307aab0913ad34309013673fd63 (patch)
treea32d31ae0e7d958377f4cffae704dc6b71da42a2 /app/helpers/notifications_helper.rb
parent10dd303170516ec03825dcceadac39967445917e (diff)
downloadgitlab-ce-913aff3ce27a7307aab0913ad34309013673fd63.tar.gz
Merge branch 'fe-fix-issuable-sidebar-icon-of-notification-disabled' into 'master'12-2-auto-deploy-20190818
Fix issuable sidebar icon of notification disabled See merge request gitlab-org/gitlab-ce!32134 (cherry picked from commit a93612aa5fab7d70f0b6165856402ac53ab18faf) 9ad0a8ad Fix issuable sidebar icon of notification disabled
Diffstat (limited to 'app/helpers/notifications_helper.rb')
-rw-r--r--app/helpers/notifications_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb
index 5678304ffcf..8855e0cdd70 100644
--- a/app/helpers/notifications_helper.rb
+++ b/app/helpers/notifications_helper.rb
@@ -106,9 +106,9 @@ module NotificationsHelper
end
end
- def notification_setting_icon(notification_setting)
+ def notification_setting_icon(notification_setting = nil)
sprite_icon(
- notification_setting.disabled? ? "notifications-off" : "notifications",
+ !notification_setting.present? || notification_setting.disabled? ? "notifications-off" : "notifications",
css_class: "icon notifications-icon js-notifications-icon"
)
end