@@ -41,7 +41,6 @@ export interface IDoc extends codemirror.Doc {
41
41
export interface IInstance extends codemirror . Editor , IDoc {
42
42
options : codemirror . EditorConfiguration
43
43
}
44
-
45
44
/* </tshacks> */
46
45
47
46
export interface ICodeMirror {
@@ -559,9 +558,7 @@ export class Controlled extends React.Component<IControlledCodeMirror, any> {
559
558
560
559
let className = this . props . className ? `react-codemirror2 ${ this . props . className } ` : 'react-codemirror2' ;
561
560
562
- return (
563
- < div className = { className } ref = { ( self ) => this . ref = self } />
564
- )
561
+ return < div className = { className } ref = { self => this . ref = self } />
565
562
}
566
563
}
567
564
@@ -723,22 +720,20 @@ export class UnControlled extends React.Component<IUnControlledCodeMirror, any>
723
720
/** @internal */
724
721
public componentWillReceiveProps ( nextProps ) {
725
722
726
- if ( this . detached && ( nextProps . detach === false ) ) {
723
+ if ( this . detached && ( nextProps . detach === false ) ) {
727
724
this . detached = false ;
728
725
if ( this . props . editorDidAttach ) {
729
726
this . props . editorDidAttach ( this . editor ) ;
730
727
}
731
728
}
732
729
733
- if ( ! this . detached && ( nextProps . detach === true ) ) {
730
+ if ( ! this . detached && ( nextProps . detach === true ) ) {
734
731
this . detached = true ;
735
732
if ( this . props . editorDidDetach ) {
736
733
this . props . editorDidDetach ( this . editor ) ;
737
734
}
738
735
}
739
736
740
-
741
-
742
737
if ( SERVER_RENDERED || this . detached ) return ;
743
738
744
739
let preserved : IPreservedOptions = { cursor : null } ;
@@ -794,8 +789,6 @@ export class UnControlled extends React.Component<IUnControlledCodeMirror, any>
794
789
795
790
let className = this . props . className ? `react-codemirror2 ${ this . props . className } ` : 'react-codemirror2' ;
796
791
797
- return (
798
- < div className = { className } ref = { ( self ) => this . ref = self } />
799
- )
792
+ return < div className = { className } ref = { self => this . ref = self } />
800
793
}
801
794
}
0 commit comments