enhance code

This commit is contained in:
Ted 2025-02-18 14:53:29 +08:00
parent 3754160407
commit 65edb38ec9

View File

@ -30,6 +30,7 @@ import { type ClientApi, getClientApi } from "../client/api";
import { useAccessStore } from "../store"; import { useAccessStore } from "../store";
import clsx from "clsx"; import clsx from "clsx";
import { initializeMcpSystem, isMcpEnabled } from "../mcp/actions"; import { initializeMcpSystem, isMcpEnabled } from "../mcp/actions";
import { isEmpty } from "lodash-es";
export function Loading(props: { noLogo?: boolean }) { export function Loading(props: { noLogo?: boolean }) {
return ( return (
@ -270,7 +271,7 @@ export function Home() {
} }
// 处理消息 // 处理消息
if (event?.data?.omeToken !== null || event?.data?.omeToken !== undefined) if (!isEmpty(event?.data?.omeToken))
appConfig.setOmeToken(event.data.omeToken); appConfig.setOmeToken(event.data.omeToken);
}; };