Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix(web): guard tenant info in embed app modal (#18940)

huyua9de8ee377555e
diff --git a/web/src/pages/next-search/embed-app-modal.tsx b/web/src/pages/next-search/embed-app-modal.tsx
index 35be3d759e..6166c2d7ff 100644
--- a/web/src/pages/next-search/embed-app-modal.tsx
+++ b/web/src/pages/next-search/embed-app-modal.tsx
@@ -41,7 +41,7 @@ type IEmbedAppModalProps = {
const EmbedAppModal = (props: IEmbedAppModalProps) => {
const { t } = useTranslate('search');
const { data: tenantInfo } = useFetchTenantInfo();
- const tenantId = tenantInfo.tenant_id;
+ const tenantId = tenantInfo?.tenant_id ?? '';
const { open, setOpen, token = '', from, url, beta = '' } = props;
const [hideAvatar, setHideAvatar] = useState(false);