Skip to content

Commit eec66b1

Browse files
committed
Fix failure to roll back optimistic update after error
1 parent 55e01a9 commit eec66b1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

public/scripts/example.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ var CommentBox = React.createClass({
5555
this.setState({data: data});
5656
}.bind(this),
5757
error: function(xhr, status, err) {
58+
this.setState({data: comments});
5859
console.error(this.props.url, status, err.toString());
5960
}.bind(this)
6061
});

0 commit comments

Comments
 (0)