@@ -2,21 +2,19 @@ import {createContext, forwardRef} from 'react'
22
33// React.createContext is available since v16.3.0
44const context =
5- /*#__PURE__*/ typeof createContext === 'function'
6- ? createContext ( )
7- : { Provider : { } , Consumer : { } }
5+ /*#__PURE__*/ typeof createContext === 'function' &&
6+ /*#__PURE__*/ createContext ( )
87
9- export const REACT_PROVIDER_TYPE = /*#__PURE__*/ context . Provider . $$typeof
8+ export const REACT_PROVIDER_TYPE = context && context . Provider . $$typeof
109
11- export const REACT_CONTEXT_TYPE = /*#__PURE__*/ context . Consumer . $$typeof
10+ export const REACT_CONTEXT_TYPE = context && context . Consumer . $$typeof
1211
1312// React.forwardRef is available since v16.3.0
1413export const REACT_FORWARD_REF_TYPE =
15- /*#__PURE__*/ typeof forwardRef === 'function'
16- ? forwardRef (
17- // need to access both params otherwise react warns
18- // but as this is never used this is no-op
19- /* istanbul ignore next line */
20- ( props , ref ) => ( { props, ref} ) ,
21- ) . $$typeof
22- : undefined
14+ /*#__PURE__*/ typeof forwardRef === 'function' &&
15+ /*#__PURE__*/ forwardRef (
16+ // need to access both params otherwise react warns
17+ // but as this is never used this is no-op
18+ /* istanbul ignore next line */
19+ ( props , ref ) => ( { props, ref} ) ,
20+ ) . $$typeof
0 commit comments