From af3839c9ff20a177fdc0dcf9c27381b624c199c4 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Thu, 21 Jan 2021 07:14:32 +1100 Subject: [PATCH] Added null check to token status --- src/components/token/TokenStatus.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/components/token/TokenStatus.js b/src/components/token/TokenStatus.js index fdea596..6496eae 100644 --- a/src/components/token/TokenStatus.js +++ b/src/components/token/TokenStatus.js @@ -6,19 +6,20 @@ import colors from "../../helpers/colors"; function TokenStatus({ tokenState, width, height }) { return ( - {tokenState.statuses.map((status, index) => ( - - ))} + {tokenState && + tokenState.statuses.map((status, index) => ( + + ))} ); }