From 0cd3921f4467e7b4cca5f8cc7fb8183fc532f04a Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Mon, 19 Jun 2017 21:29:33 +0700 Subject: [PATCH] Simplification --- .../routes/Moderation/components/Moderation.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/client/coral-admin/src/routes/Moderation/components/Moderation.js b/client/coral-admin/src/routes/Moderation/components/Moderation.js index ec858eaed..c2036247d 100644 --- a/client/coral-admin/src/routes/Moderation/components/Moderation.js +++ b/client/coral-admin/src/routes/Moderation/components/Moderation.js @@ -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 ; - } + // Not found. + return ; + } + if (asset === undefined || asset.id !== providedAssetId) { - if (providedAssetId && (asset === undefined || asset.id !== providedAssetId)) { - - // Still loading. - return ; + // Still loading. + return ; + } } const comments = root[activeTab];