mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 11:32:52 +08:00
fix: warning of check of rspack (#52168)
This commit is contained in:
parent
513f22784d
commit
993d514af3
@ -15,13 +15,10 @@ const defaultReactRender: RenderType = (node, container) => {
|
|||||||
// Warning for React 19
|
// Warning for React 19
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
const majorVersion = parseInt(React.version.split('.')[0], 10);
|
const majorVersion = parseInt(React.version.split('.')[0], 10);
|
||||||
|
const fullKeys = Object.keys(ReactDOM);
|
||||||
|
|
||||||
warning(
|
warning(
|
||||||
majorVersion < 19 ||
|
majorVersion < 19 || fullKeys.includes('createRoot'),
|
||||||
!!(
|
|
||||||
ReactDOM as typeof ReactDOM & {
|
|
||||||
createRoot: VoidFunction;
|
|
||||||
}
|
|
||||||
).createRoot,
|
|
||||||
'compatible',
|
'compatible',
|
||||||
'antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.',
|
'antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.',
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user