Added null check to token status

This commit is contained in:
Mitchell McCaffrey 2021-01-21 07:14:32 +11:00
parent cf63034c0e
commit af3839c9ff

View File

@ -6,7 +6,8 @@ import colors from "../../helpers/colors";
function TokenStatus({ tokenState, width, height }) {
return (
<Group x={width} y={height} offsetX={width / 2} offsetY={height / 2}>
{tokenState.statuses.map((status, index) => (
{tokenState &&
tokenState.statuses.map((status, index) => (
<Circle
key={status}
width={width}