From 31f171e94a9fe80c8284ed20fbc7c5a0ef3c2ee0 Mon Sep 17 00:00:00 2001 From: slice Date: Mon, 16 Jul 2018 18:16:39 -0700 Subject: [PATCH] refactor if statement to ternary --- priv/frontend/src/components/App.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/priv/frontend/src/components/App.js b/priv/frontend/src/components/App.js index 24462bb..79dce85 100644 --- a/priv/frontend/src/components/App.js +++ b/priv/frontend/src/components/App.js @@ -185,13 +185,10 @@ export default class App extends Component { )) - let notice = null const down = allServices.filter(([, { status }]) => !status) - - if (down.length !== 0) { - // a service is down :( - notice = - } + const notice = down.length > 0 + ? + : null metrics = (