From fd70bb82d2af1ae33364b5424039385044d0cdd8 Mon Sep 17 00:00:00 2001 From: noracato Date: Thu, 19 Sep 2024 14:10:01 +0200 Subject: [PATCH] Fix coupling menu when no coulings are present --- app/views/layouts/etm/_scenario_nav.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/etm/_scenario_nav.html.haml b/app/views/layouts/etm/_scenario_nav.html.haml index 5d2502572c..b95724d343 100644 --- a/app/views/layouts/etm/_scenario_nav.html.haml +++ b/app/views/layouts/etm/_scenario_nav.html.haml @@ -73,7 +73,7 @@ %li %a.dropdown-item.external{ href: "https://docs.energytransitionmodel.com/main/external-coupling", target: "_blank"} = t('header.coupled_docs') - - if Current.setting.active_couplings.any? { |coupling| COUPLING_GROUP_LABELS.key?(coupling) } + - if Current.setting.active_couplings&.any? { |coupling| COUPLING_GROUP_LABELS.key?(coupling) } %li.sep-above.category = t('header.coupled_groups') - Current.setting.active_couplings.each do |coupling|