From bd7ed2442fd1508e23f9896a99d6493fdb3a6865 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Wed, 21 Mar 2018 14:03:46 +0530 Subject: [PATCH] minor cleanup of the render function --- dashboard/src/components/AppNew/AppNew.tsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/dashboard/src/components/AppNew/AppNew.tsx b/dashboard/src/components/AppNew/AppNew.tsx index f20ff8953258..c995dfaa54c9 100644 --- a/dashboard/src/components/AppNew/AppNew.tsx +++ b/dashboard/src/components/AppNew/AppNew.tsx @@ -83,15 +83,12 @@ class AppNew extends React.Component { } public render() { - if ( - !this.props.selected.version || - !this.state.appValues || - !this.props.selected.versions.length - ) { + const { selected, bindings } = this.props; + const { version, versions } = selected; + const { appValues, selectedBinding } = this.state; + if (!version || !appValues || !versions.length) { return
Loading
; } - const { bindings } = this.props; - const { selectedBinding } = this.state; let bindingDetail =
; if (selectedBinding) { const { @@ -149,7 +146,7 @@ class AppNew extends React.Component {