From 81d5ea79fd54dfb1bbda09f41cbd896a0e9032e1 Mon Sep 17 00:00:00 2001 From: Kristjan Kruus Date: Wed, 25 Mar 2026 17:03:46 +0200 Subject: [PATCH] Update web/frontend/src/components/config/config-sections.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/components/config/config-sections.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/web/frontend/src/components/config/config-sections.tsx b/web/frontend/src/components/config/config-sections.tsx index d842c601e..f07779bfa 100644 --- a/web/frontend/src/components/config/config-sections.tsx +++ b/web/frontend/src/components/config/config-sections.tsx @@ -700,16 +700,14 @@ export function RuntimeSection({ form, onFieldChange }: RuntimeSectionProps) { > - {LOG_LEVEL_OPTIONS.find((o) => o.value === form.gatewayLogLevel) - ? t( - LOG_LEVEL_OPTIONS.find( - (o) => o.value === form.gatewayLogLevel, - )!.labelKey, - LOG_LEVEL_OPTIONS.find( - (o) => o.value === form.gatewayLogLevel, - )!.labelDefault, - ) - : form.gatewayLogLevel} + {(() => { + const selected = LOG_LEVEL_OPTIONS.find( + (o) => o.value === form.gatewayLogLevel, + ) + return selected + ? t(selected.labelKey, selected.labelDefault) + : form.gatewayLogLevel + })()}