diff --git a/src/komponenter/footer/chatbot/ChatbotWrapper.tsx b/src/komponenter/footer/chatbot/ChatbotWrapper.tsx index 77b55efa3..776f85a31 100644 --- a/src/komponenter/footer/chatbot/ChatbotWrapper.tsx +++ b/src/komponenter/footer/chatbot/ChatbotWrapper.tsx @@ -40,13 +40,13 @@ export const ChatbotWrapper = () => { const [scriptLoaded, setScriptLoaded] = useState(false); const currentFeatureToggles = useSelector(stateSelector).featureToggles; - const isDevelopment: boolean = process.env.NODE_ENV === 'development'; + const isLocal: boolean = env === 'localhost'; const isProduction = env === 'prod'; const boostApiUrlBase = isProduction ? boostApiUrlBaseProduction : boostApiUrlBaseTest; const cookieSettings = { path: '/', - domain: isDevelopment ? 'localhost' : '.nav.no', + domain: isLocal ? 'localhost' : '.nav.no', }; const openBoostWindow = () => {