Skip to content

Commit 8b136b9

Browse files
committed
fix: edit DEMO11
1 parent f73b8b9 commit 8b136b9

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,10 @@ var UserGist = React.createClass({
422422
componentDidMount: function() {
423423
$.get(this.props.source, function(result) {
424424
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+
});
431429
}.bind(this));
432430
},
433431

demo11/index.html

+4-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@
2020
componentDidMount: function() {
2121
$.get(this.props.source, function(result) {
2222
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+
});
2927
}.bind(this));
3028
},
3129

0 commit comments

Comments
 (0)