@@ -6,6 +6,10 @@ Object.defineProperty(exports, '__esModule', {
6
6
7
7
var _createClass = ( function ( ) { function defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( 'value' in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } } return function ( Constructor , protoProps , staticProps ) { if ( protoProps ) defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) defineProperties ( Constructor , staticProps ) ; return Constructor ; } ; } ) ( ) ;
8
8
9
+ var _get = function get ( _x , _x2 , _x3 ) { var _again = true ; _function: while ( _again ) { desc = parent = getter = undefined ; _again = false ; var object = _x ,
10
+ property = _x2 ,
11
+ receiver = _x3 ; var desc = Object . getOwnPropertyDescriptor ( object , property ) ; if ( desc === undefined ) { var parent = Object . getPrototypeOf ( object ) ; if ( parent === null ) { return undefined ; } else { _x = parent ; _x2 = property ; _x3 = receiver ; _again = true ; continue _function; } } else if ( 'value' in desc ) { return desc . value ; } else { var getter = desc . get ; if ( getter === undefined ) { return undefined ; } return getter . call ( receiver ) ; } } } ;
12
+
9
13
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; }
10
14
11
15
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( 'Cannot call a class as a function' ) ; } }
@@ -37,19 +41,29 @@ var defaultProps = {
37
41
} ;
38
42
39
43
var CodeExample = ( function ( _React$Component ) {
40
- function CodeExample ( ) {
44
+ function CodeExample ( props ) {
41
45
_classCallCheck ( this , CodeExample ) ;
42
46
43
- if ( _React$Component != null ) {
44
- _React$Component . apply ( this , arguments ) ;
45
- }
47
+ _get ( Object . getPrototypeOf ( CodeExample . prototype ) , 'constructor' , this ) . call ( this , props ) ;
48
+
49
+ this . update = this . update . bind ( this ) ;
46
50
}
47
51
48
52
_inherits ( CodeExample , _React$Component ) ;
49
53
50
54
_createClass ( CodeExample , [ {
51
55
key : 'componentDidMount' ,
52
56
value : function componentDidMount ( ) {
57
+ this . update ( ) ;
58
+ }
59
+ } , {
60
+ key : 'componentDidUpdate' ,
61
+ value : function componentDidUpdate ( ) {
62
+ this . update ( ) ;
63
+ }
64
+ } , {
65
+ key : 'update' ,
66
+ value : function update ( ) {
53
67
if ( _CodeMirrorSettings . CodeMirror === undefined ) {
54
68
return ;
55
69
}
0 commit comments