diff --git a/packages/utils/src/compareVersions/openVisibleCompatible.ts b/packages/utils/src/compareVersions/openVisibleCompatible.ts index 4562a3eb030d..ce54f343fa02 100644 --- a/packages/utils/src/compareVersions/openVisibleCompatible.ts +++ b/packages/utils/src/compareVersions/openVisibleCompatible.ts @@ -4,7 +4,7 @@ import { compareVersions } from './index'; const openVisibleCompatible = (open: boolean | undefined, onOpenChange?: any) => { const props = - compareVersions(process.env.ANTD_VERSION || version, '4.23.0') > -1 + compareVersions(process?.env?.ANTD_VERSION || version, '4.23.0') > -1 ? { open: open, onOpenChange: onOpenChange,