mirror of
https://github.com/wassname/talk.git
synced 2026-07-23 13:10:20 +08:00
Merge pull request #798 from coralproject/live-reactions-no-comment
Live Reactions should not always expect the comment to be there.
This commit is contained in:
@@ -54,6 +54,13 @@ export default (reaction) => (WrappedComponent) => {
|
||||
id: fragmentId
|
||||
});
|
||||
|
||||
if (!data) {
|
||||
if (self) {
|
||||
throw new Error(`Comment ${action.item_id} was not found`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Add our comment from the mutation to the end.
|
||||
let idx = data.action_summaries.findIndex(isReaction);
|
||||
|
||||
@@ -96,6 +103,13 @@ export default (reaction) => (WrappedComponent) => {
|
||||
id: fragmentId
|
||||
});
|
||||
|
||||
if (!data) {
|
||||
if (self) {
|
||||
throw new Error(`Comment ${action.item_id} was not found`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Check whether we liked this comment.
|
||||
const idx = data.action_summaries.findIndex(isReaction);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user