From c8b6c6150b36b87b7159fabeed339b42835c6290 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 12 Dec 2019 16:28:22 +0100 Subject: [PATCH] [web] fix status column rendering --- web/src/js/components/FlowTable/FlowColumns.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/src/js/components/FlowTable/FlowColumns.jsx b/web/src/js/components/FlowTable/FlowColumns.jsx index 07b54a324..64b8ac829 100644 --- a/web/src/js/components/FlowTable/FlowColumns.jsx +++ b/web/src/js/components/FlowTable/FlowColumns.jsx @@ -92,19 +92,19 @@ MethodColumn.headerName = 'Method' export function StatusColumn({ flow }) { let color = 'darkred'; - if (flow.response !== null && 100 <= flow.response.status_code && flow.response.status_code < 200) { + if (flow.response && 100 <= flow.response.status_code && flow.response.status_code < 200) { color = 'green' } - else if (flow.response !== null && 200 <= flow.response.status_code && flow.response.status_code < 300) { + else if (flow.response && 200 <= flow.response.status_code && flow.response.status_code < 300) { color = 'darkgreen' } - else if (flow.response !== null && 300 <= flow.response.status_code && flow.response.status_code < 400) { + else if (flow.response && 300 <= flow.response.status_code && flow.response.status_code < 400) { color = 'lightblue' } - else if (flow.response !== null && 400 <= flow.response.status_code && flow.response.status_code < 500) { + else if (flow.response && 400 <= flow.response.status_code && flow.response.status_code < 500) { color = 'lightred' } - else if (flow.response !== null && 500 <= flow.response.status_code && flow.response.status_code < 600) { + else if (flow.response && 500 <= flow.response.status_code && flow.response.status_code < 600) { color = 'lightred' }