|
@ -384,8 +384,12 @@ var CommentBox = React.createClass({ |
|
|
getInitialState: function() { |
|
|
getInitialState: function() { |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: 'comments.json', |
|
|
url: 'comments.json', |
|
|
|
|
|
dataType: 'json', |
|
|
success: function(data) { |
|
|
success: function(data) { |
|
|
this.setState({data: data}); |
|
|
this.setState({data: data}); |
|
|
|
|
|
}.bind(this), |
|
|
|
|
|
error: function(xhr, status, err) { |
|
|
|
|
|
console.error("comments.json", status, err.toString()); |
|
|
}.bind(this) |
|
|
}.bind(this) |
|
|
}); |
|
|
}); |
|
|
return {data: []}; |
|
|
return {data: []}; |
|
|