Skip to content

Commit 843e719

Browse files
Correct capitalization to prevent "TypeError: Cannot read property 'toString' of undefined" exception after the optimistic updates code is added.
1 parent c8be187 commit 843e719

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

site/jekyll/getting-started/tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ var CommentForm = React.createClass({
679679
if (!text || !author) {
680680
return;
681681
}
682-
this.props.onCommentSubmit({author: author, text: text});
682+
this.props.onCommentSubmit({Author: author, Text: text});
683683
this.refs.author.getDOMNode().value = '';
684684
this.refs.text.getDOMNode().value = '';
685685
return;
@@ -711,8 +711,8 @@ var CommentBox = React.createClass({
711711
},
712712
handleCommentSubmit: function(comment) {
713713
var data = new FormData();
714-
data.append('Author', comment.author);
715-
data.append('Text', comment.text);
714+
data.append('Author', comment.Author);
715+
data.append('Text', comment.Text);
716716
717717
var xhr = new XMLHttpRequest();
718718
xhr.open('post', this.props.submitUrl, true);

0 commit comments

Comments
 (0)