Skip to content

Commit

Permalink
fix: edit DEMO11
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanyf committed Jan 6, 2018
1 parent f73b8b9 commit 8b136b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,10 @@ var UserGist = React.createClass({
componentDidMount: function() {
$.get(this.props.source, function(result) {
var lastGist = result[0];
if (this.isMounted()) {
this.setState({
username: lastGist.owner.login,
lastGistUrl: lastGist.html_url
});
}
this.setState({
username: lastGist.owner.login,
lastGistUrl: lastGist.html_url
});
}.bind(this));
},

Expand Down
10 changes: 4 additions & 6 deletions demo11/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@
componentDidMount: function() {
$.get(this.props.source, function(result) {
var lastGist = result[0];
if (this.isMounted()) {
this.setState({
username: lastGist.owner.login,
lastGistUrl: lastGist.html_url
});
}
this.setState({
username: lastGist.owner.login,
lastGistUrl: lastGist.html_url
});
}.bind(this));
},

Expand Down

0 comments on commit 8b136b9

Please sign in to comment.