Skip to content

Commit b26f068

Browse files
authored
Update ref.ts
1 parent 99d8344 commit b26f068

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ref.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type * as React from 'react';
2-
import { isValidElement } from 'react';
2+
import { isValidElement, version } from 'react';
33
import { ForwardRef, isMemo } from 'react-is';
44
import useMemo from './hooks/useMemo';
55
import isFragment from './React/isFragment';
@@ -45,7 +45,7 @@ export const supportRef = (nodeOrComponent: any): boolean => {
4545
// React 19 no need `forwardRef` anymore. So just pass if is a React element.
4646
if (
4747
isReactElement(nodeOrComponent) &&
48-
React.version.startsWith('19.')
48+
version.startsWith('19.')
4949
) {
5050
return true;
5151
}

0 commit comments

Comments
 (0)