mirror of
https://github.com/wassname/talk.git
synced 2026-07-29 11:28:24 +08:00
Better error detection
This commit is contained in:
@@ -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 <StreamError>{t('stream.comment_not_found')}</StreamError>;
|
||||
}
|
||||
console.error('Talk: No comments came back from the graph given that query. Please, check the query params.');
|
||||
return <StreamError>{t('common.error')}</StreamError>;
|
||||
if (highlightedComment === null) {
|
||||
return <StreamError>{t('stream.comment_not_found')}</StreamError>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user