diff --git a/web/app/components/base/chat/embedded-chatbot/header/index.tsx b/web/app/components/base/chat/embedded-chatbot/header/index.tsx index 95ba6d212d..fe7afc9e22 100644 --- a/web/app/components/base/chat/embedded-chatbot/header/index.tsx +++ b/web/app/components/base/chat/embedded-chatbot/header/index.tsx @@ -11,6 +11,7 @@ import DifyLogo from '@/app/components/base/logo/dify-logo' import Tooltip from '@/app/components/base/tooltip' import { useGlobalPublicStore } from '@/context/global-public-context' import { cn } from '@/utils/classnames' +import { isClient } from '@/utils/client' import { useEmbeddedChatbotContext, } from '../context' @@ -40,7 +41,6 @@ const Header: FC = ({ allInputsHidden, } = useEmbeddedChatbotContext() - const isClient = typeof window !== 'undefined' const isIframe = isClient ? window.self !== window.top : false const [parentOrigin, setParentOrigin] = useState('') const [showToggleExpandButton, setShowToggleExpandButton] = useState(false)