From aa4f781d25271a19480f7f6237548c0c0b255ef9 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Sat, 16 Sep 2017 01:27:50 +0700 Subject: [PATCH] Better error detection --- client/coral-embed-stream/src/components/Stream.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/client/coral-embed-stream/src/components/Stream.js b/client/coral-embed-stream/src/components/Stream.js index 5a7579567..af2ec698b 100644 --- a/client/coral-embed-stream/src/components/Stream.js +++ b/client/coral-embed-stream/src/components/Stream.js @@ -201,7 +201,7 @@ class Stream extends React.Component { data, root, appendItemArray, - root: {asset, asset: {comment: highlightedComment, comments}}, + root: {asset, asset: {comment: highlightedComment}}, postComment, notify, updateItem, @@ -222,12 +222,8 @@ class Stream extends React.Component { const slotProps = {data}; const slotQueryData = {root, asset}; - if (!highlightedComment && !comments) { - if (highlightedComment === null) { - return {t('stream.comment_not_found')}; - } - console.error('Talk: No comments came back from the graph given that query. Please, check the query params.'); - return {t('common.error')}; + if (highlightedComment === null) { + return {t('stream.comment_not_found')}; } return (