2
2
3
3
Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
4
4
5
- function _interopDefault ( ex ) { return ( ex && ( typeof ex === 'object' ) && 'default' in ex ) ? ex [ 'default' ] : ex ; }
5
+ var React = require ( 'react' ) ;
6
6
7
- var React = _interopDefault ( require ( 'react' ) ) ;
7
+ function _interopDefaultLegacy ( e ) { return e && typeof e === 'object' && 'default' in e ? e : { 'default' : e } ; }
8
+
9
+ var React__default = /*#__PURE__*/ _interopDefaultLegacy ( React ) ;
8
10
9
11
function _typeof ( obj ) {
10
12
"@babel/helpers - typeof" ;
@@ -49,9 +51,9 @@ function invariant(condition, message) {
49
51
throw new Error ( prefix + ": " + ( message || '' ) ) ;
50
52
}
51
53
52
- React . PureComponent . prototype . componentDidMount = function ( ) { } ;
54
+ React__default [ 'default' ] . PureComponent . prototype . componentDidMount = function ( ) { } ;
53
55
54
- React . Component . prototype . componentDidMount = function ( ) { } ;
56
+ React__default [ 'default' ] . Component . prototype . componentDidMount = function ( ) { } ;
55
57
56
58
invariant ( typeof Symbol === 'function' && Symbol [ "for" ] , 'react-class-hooks needs Symbols!' ) ; // Separate objects for better debugging.
57
59
@@ -60,11 +62,12 @@ var MAGIC_EFFECTS = Symbol["for"]('magicEffects');
60
62
var MAGIC_MEMOS = Symbol [ "for" ] ( 'magicMemos' ) ;
61
63
var MAGIC_REFS = Symbol [ "for" ] ( 'magicRefs' ) ;
62
64
var MAGIC_STACKS = Symbol [ "for" ] ( 'magicStacks' ) ;
63
- var ReactInternals = React . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ; // React 15.3.2 support + Polyfill
65
+ var ReactInternals = React__default [ 'default' ] . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ;
66
+ var isReact15 = React__default [ 'default' ] . version . indexOf ( '15' ) === 0 ; // React 15.3.2 support + Polyfill
64
67
65
- var instanceKey = React . version . indexOf ( '16' ) === 0 ? 'stateNode ' : '_instance ' ;
68
+ var instanceKey = isReact15 ? '_instance ' : 'stateNode ' ;
66
69
67
- if ( React . version . indexOf ( '15' ) === 0 ) {
70
+ if ( isReact15 ) {
68
71
invariant ( ReactInternals , 'Please for React ^15.3.2 - 15.6.2 import "react-class-hooks/poly15" in your root index.js!' ) ;
69
72
}
70
73
0 commit comments