File tree 2 files changed +8
-12
lines changed
2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -422,12 +422,10 @@ var UserGist = React.createClass({
422
422
componentDidMount : function () {
423
423
$ .get (this .props .source , function (result ) {
424
424
var lastGist = result[0 ];
425
- if (this .isMounted ()) {
426
- this .setState ({
427
- username: lastGist .owner .login ,
428
- lastGistUrl: lastGist .html_url
429
- });
430
- }
425
+ this .setState ({
426
+ username: lastGist .owner .login ,
427
+ lastGistUrl: lastGist .html_url
428
+ });
431
429
}.bind (this ));
432
430
},
433
431
Original file line number Diff line number Diff line change 20
20
componentDidMount : function ( ) {
21
21
$ . get ( this . props . source , function ( result ) {
22
22
var lastGist = result [ 0 ] ;
23
- if ( this . isMounted ( ) ) {
24
- this . setState ( {
25
- username : lastGist . owner . login ,
26
- lastGistUrl : lastGist . html_url
27
- } ) ;
28
- }
23
+ this . setState ( {
24
+ username : lastGist . owner . login ,
25
+ lastGistUrl : lastGist . html_url
26
+ } ) ;
29
27
} . bind ( this ) ) ;
30
28
} ,
31
29
You can’t perform that action at this time.
0 commit comments