mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +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
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const majorVersion = parseInt(React.version.split('.')[0], 10);
|
||||
const fullKeys = Object.keys(ReactDOM);
|
||||
|
||||
warning(
|
||||
majorVersion < 19 ||
|
||||
!!(
|
||||
ReactDOM as typeof ReactDOM & {
|
||||
createRoot: VoidFunction;
|
||||
}
|
||||
).createRoot,
|
||||
majorVersion < 19 || fullKeys.includes('createRoot'),
|
||||
'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