diff --git a/Gemfile.lock b/Gemfile.lock index c8b223175..c721dcb10 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -170,7 +170,7 @@ GEM irb (1.11.1) rdoc reline (>= 0.4.2) - json (2.6.3) + json (2.7.1) kramdown (2.4.0) rexml language_server-protocol (3.17.0.3) @@ -415,8 +415,8 @@ GEM opentelemetry-semantic_conventions opentelemetry-semantic_conventions (1.10.0) opentelemetry-api (~> 1.0) - parallel (1.23.0) - parser (3.2.2.3) + parallel (1.24.0) + parser (3.3.0.5) ast (~> 2.4.1) racc plek (5.0.0) @@ -481,7 +481,7 @@ GEM redis-client (>= 0.17.0) redis-client (0.17.1) connection_pool - regexp_parser (2.8.3) + regexp_parser (2.9.0) reline (0.4.2) io-console (~> 0.5) request_store (1.5.1) @@ -493,37 +493,38 @@ GEM netrc (~> 0.8) rexml (3.2.6) rouge (4.2.0) - rubocop (1.55.0) + rubocop (1.59.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) - rubocop-capybara (2.18.0) + rubocop-capybara (2.20.0) rubocop (~> 1.41) - rubocop-factory_bot (2.23.1) - rubocop (~> 1.33) - rubocop-govuk (4.12.0) - rubocop (= 1.55.0) - rubocop-ast (= 1.29.0) - rubocop-rails (= 2.20.2) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) + rubocop-govuk (4.13.0) + rubocop (= 1.59.0) + rubocop-ast (= 1.30.0) + rubocop-rails (= 2.23.0) rubocop-rake (= 0.6.0) - rubocop-rspec (= 2.22.0) - rubocop-rails (2.20.2) + rubocop-rspec (= 2.25.0) + rubocop-rails (2.23.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.22.0) - rubocop (~> 1.33) + rubocop-rspec (2.25.0) + rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) ruby-progressbar (1.13.0) @@ -563,7 +564,7 @@ GEM concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) webmock (3.19.1) addressable (>= 2.8.0) crack (>= 0.3.2) 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