mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
Safe access
This commit is contained in:
@@ -15,6 +15,7 @@ import QuestionBox from 'talk-plugin-questionbox/QuestionBox';
|
||||
import {isCommentActive} from 'coral-framework/utils';
|
||||
import {Button, Tab, TabCount, TabPane} from 'coral-ui';
|
||||
import cn from 'classnames';
|
||||
import get from 'lodash/get';
|
||||
|
||||
import {getTopLevelParent, attachCommentToParent} from '../graphql/utils';
|
||||
import AllCommentsPane from './AllCommentsPane';
|
||||
@@ -212,8 +213,8 @@ class Stream extends React.Component {
|
||||
const {keepCommentBox} = this.state;
|
||||
const open = !asset.isClosed;
|
||||
|
||||
const banned = user && user.status.banned.status;
|
||||
const pending = user && user.status.username.status === 'CHANGED' || user.status.username.status === 'SET';
|
||||
const banned = get(user, 'status.banned.status');
|
||||
const pending = get(user, 'status.username.status') === 'CHANGED' || get(user, 'status.username.status') === 'SET';
|
||||
|
||||
const temporarilySuspended =
|
||||
user &&
|
||||
|
||||
Reference in New Issue
Block a user