From d7dd63539403696d03f9bb78f658ee0428a49781 Mon Sep 17 00:00:00 2001 From: Morten Mikalsen Date: Fri, 29 Sep 2023 09:16:30 +0200 Subject: [PATCH] Fix code smell --- src/komponenter/footer/chatbot/ChatbotWrapper.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/komponenter/footer/chatbot/ChatbotWrapper.tsx b/src/komponenter/footer/chatbot/ChatbotWrapper.tsx index f38c288b1..c8d2b2d71 100644 --- a/src/komponenter/footer/chatbot/ChatbotWrapper.tsx +++ b/src/komponenter/footer/chatbot/ChatbotWrapper.tsx @@ -56,12 +56,12 @@ export const ChatbotWrapper = () => { return; } - const preferredFilter = - arbeidsflate === MenuValue.ARBEIDSGIVER - ? 'arbeidsgiver' - : language === Locale.NYNORSK - ? 'nynorsk' - : 'bokmal'; + let preferredFilter; + if (arbeidsflate === MenuValue.ARBEIDSGIVER) { + preferredFilter = 'arbeidsgiver'; + } else { + preferredFilter = language === Locale.NYNORSK ? 'nynorsk' : 'bokmal'; + } const options: BoostConfig = { chatPanel: {