mirror of
https://github.com/wassname/talk.git
synced 2026-07-28 11:27:05 +08:00
Simplification
This commit is contained in:
@@ -108,16 +108,17 @@ export default class Moderation extends Component {
|
||||
const activeTab = this.props.route.path === ':id' ? 'premod' : this.props.route.path;
|
||||
const {asset} = root;
|
||||
|
||||
if (providedAssetId && asset === null) {
|
||||
if (providedAssetId) {
|
||||
if (asset === null) {
|
||||
|
||||
// Not found.
|
||||
return <NotFoundAsset assetId={providedAssetId} />;
|
||||
}
|
||||
// Not found.
|
||||
return <NotFoundAsset assetId={providedAssetId} />;
|
||||
}
|
||||
if (asset === undefined || asset.id !== providedAssetId) {
|
||||
|
||||
if (providedAssetId && (asset === undefined || asset.id !== providedAssetId)) {
|
||||
|
||||
// Still loading.
|
||||
return <Spinner />;
|
||||
// Still loading.
|
||||
return <Spinner />;
|
||||
}
|
||||
}
|
||||
|
||||
const comments = root[activeTab];
|
||||
|
||||
Reference in New Issue
Block a user