From 340d3cea62e3d9df4a3d110b88a6fdac16867cce Mon Sep 17 00:00:00 2001 From: Benjamin Goering Date: Thu, 18 May 2017 08:10:20 -0700 Subject: [PATCH] contains/Stream setCommentCountCache waits for refetch promise --- client/coral-embed-stream/src/containers/Stream.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/coral-embed-stream/src/containers/Stream.js b/client/coral-embed-stream/src/containers/Stream.js index b4b800d3c..b54e69dd6 100644 --- a/client/coral-embed-stream/src/containers/Stream.js +++ b/client/coral-embed-stream/src/containers/Stream.js @@ -112,8 +112,8 @@ class StreamContainer extends React.Component { componentDidMount() { if (this.props.previousTab) { - this.props.data.refetch(); - this.props.setCommentCountCache(0); + this.props.data.refetch() + .then(() => this.props.setCommentCountCache(0)); } this.countPoll = setInterval(() => { this.getCounts(this.props.data.variables);