From a295b3d0735d7baab7e35935edbb5ed2f75674df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=9F=E8=B4=A4?= Date: Mon, 7 Nov 2022 17:47:47 +0800 Subject: [PATCH] fix(utils): do not use process?.env?.ANTD_VERSION close https://github.com/ant-design/pro-components/issues/6164 --- packages/utils/src/compareVersions/openVisibleCompatible.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,