From bc6b7b72687ab8d93d7cd3e4d3f80309f02c0a64 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Wed, 2 Oct 2019 23:23:06 +0200 Subject: [PATCH] remove NaN bug for incident charge fee --- .../MemberIncidentsTables/components/SingleIncidentsTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/MemberIncidentsTables/components/SingleIncidentsTable.js b/client/src/components/MemberIncidentsTables/components/SingleIncidentsTable.js index 8ebef5d..7219cc1 100644 --- a/client/src/components/MemberIncidentsTables/components/SingleIncidentsTable.js +++ b/client/src/components/MemberIncidentsTables/components/SingleIncidentsTable.js @@ -118,7 +118,7 @@ const SingleIncidentsTable = props => { } break; case 'totalChargeFee': - const totalFee = props.value ? props.value : props.row['_original'].incidentPrice; + const totalFee = (props.row['_original'].incidentPrice || props.value) || 0; const totalFeeFormatted = parseFloat(totalFee).toFixed(2); cellValue = `$ ${totalFeeFormatted}`; columnContentsAlignment = columnAlignments.right;