Skip to content

Commit

Permalink
Carry ajax error checking from step facebook#13 forward to other ajax…
Browse files Browse the repository at this point in the history
… steps

The following steps also have an ajax function, but the 'error:' param
is gone after facebook#13:
facebook#14
facebook#17
facebook#19
facebook#20
This may be superfluous, but it helped me find an error with something I
was doing - Namely, in my .json file, I had single line javascript
comments ("//") that I copied from the tutorial. I couldn't find the
issue on later steps, but was able to see my issue when the error
handler complained about an unexpected "/" in my file in step facebook#13.
  • Loading branch information
georgesisco committed Apr 9, 2014
1 parent 4f1ca0e commit af7ea7c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ var CommentBox = React.createClass({
dataType: 'json',
success: function(data) {
this.setState({data: data});
}.bind(this),
error: function(xhr, status, err) {
console.error(this.props.url, status, err.toString());
}.bind(this)
});
},
Expand Down Expand Up @@ -526,6 +529,9 @@ var CommentBox = React.createClass({
dataType: 'json',
success: function(data) {
this.setState({data: data});
}.bind(this),
error: function(xhr, status, err) {
console.error(this.props.url, status, err.toString());
}.bind(this)
});
},
Expand Down Expand Up @@ -593,6 +599,9 @@ var CommentBox = React.createClass({
dataType: 'json',
success: function(data) {
this.setState({data: data});
}.bind(this),
error: function(xhr, status, err) {
console.error(this.props.url, status, err.toString());
}.bind(this)
});
},
Expand All @@ -604,6 +613,9 @@ var CommentBox = React.createClass({
data: comment,
success: function(data) {
this.setState({data: data});
}.bind(this),
error: function(xhr, status, err) {
console.error(this.props.url, status, err.toString());
}.bind(this)
});
},
Expand Down Expand Up @@ -641,6 +653,9 @@ var CommentBox = React.createClass({
dataType: 'json',
success: function(data) {
this.setState({data: data});
}.bind(this),
error: function(xhr, status, err) {
console.error(this.props.url, status, err.toString());
}.bind(this)
});
},
Expand All @@ -655,6 +670,9 @@ var CommentBox = React.createClass({
data: comment,
success: function(data) {
this.setState({data: data});
}.bind(this),
error: function(xhr, status, err) {
console.error(this.props.url, status, err.toString());
}.bind(this)
});
},
Expand Down

0 comments on commit af7ea7c

Please sign in to comment.