diff --git a/app/helpers/notification_helper.rb b/app/helpers/notification_helper.rb index c33bfb182..db89786d7 100644 --- a/app/helpers/notification_helper.rb +++ b/app/helpers/notification_helper.rb @@ -3,6 +3,6 @@ module NotificationHelper def emergency_banner_notification emergency_banner = EmergencyBanner::Display.new - return emergency_banner if emergency_banner.enabled? + emergency_banner if emergency_banner.enabled? end end diff --git a/lib/emergency_banner/display.rb b/lib/emergency_banner/display.rb index 410f013b1..da662c06b 100644 --- a/lib/emergency_banner/display.rb +++ b/lib/emergency_banner/display.rb @@ -32,7 +32,8 @@ def link def link_text return nil if link.blank? - return content[:link_text] if content[:link_text].present? + + content[:link_text].presence end private