Setting reason to null for dontAgree.

This commit is contained in:
David Jay
2017-02-23 12:24:32 -05:00
parent 8cb0f9cd90
commit 3f5d751a80
+2 -2
View File
@@ -69,7 +69,7 @@ class FlagButton extends Component {
let action = {
item_id,
item_type: itemType,
reason,
reason: null,
message
};
if (reason === 'I don\'t agree with this comment') {
@@ -80,7 +80,7 @@ class FlagButton extends Component {
}
});
} else {
postFlag(action)
postFlag({...action, reason})
.then(({data}) => {
if (itemType === 'COMMENTS') {
this.setState({localPost: data.createFlag.flag.id});