22
33Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
44
5- function _interopDefault ( ex ) { return ( ex && ( typeof ex === 'object' ) && 'default' in ex ) ? ex [ 'default' ] : ex ; }
5+ var React = require ( 'react' ) ;
66
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 ) ;
810
911function _typeof ( obj ) {
1012 "@babel/helpers - typeof" ;
@@ -49,9 +51,9 @@ function invariant(condition, message) {
4951 throw new Error ( prefix + ": " + ( message || '' ) ) ;
5052}
5153
52- React . PureComponent . prototype . componentDidMount = function ( ) { } ;
54+ React__default [ 'default' ] . PureComponent . prototype . componentDidMount = function ( ) { } ;
5355
54- React . Component . prototype . componentDidMount = function ( ) { } ;
56+ React__default [ 'default' ] . Component . prototype . componentDidMount = function ( ) { } ;
5557
5658invariant ( typeof Symbol === 'function' && Symbol [ "for" ] , 'react-class-hooks needs Symbols!' ) ; // Separate objects for better debugging.
5759
@@ -60,11 +62,12 @@ var MAGIC_EFFECTS = Symbol["for"]('magicEffects');
6062var MAGIC_MEMOS = Symbol [ "for" ] ( 'magicMemos' ) ;
6163var MAGIC_REFS = Symbol [ "for" ] ( 'magicRefs' ) ;
6264var 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
6467
65- var instanceKey = React . version . indexOf ( '16' ) === 0 ? 'stateNode ' : '_instance ' ;
68+ var instanceKey = isReact15 ? '_instance ' : 'stateNode ' ;
6669
67- if ( React . version . indexOf ( '15' ) === 0 ) {
70+ if ( isReact15 ) {
6871 invariant ( ReactInternals , 'Please for React ^15.3.2 - 15.6.2 import "react-class-hooks/poly15" in your root index.js!' ) ;
6972}
7073
0 commit comments