From 307cc536f044946289bd8b286c78094b1769b4f6 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Sun, 11 Apr 2021 14:25:59 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20fix:=20=E4=BF=AE=E6=AD=A3=20emotion=20?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=E7=9A=84=E6=B8=B2=E6=9F=93=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/journey-map/src/Chart/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/journey-map/src/Chart/index.tsx b/packages/journey-map/src/Chart/index.tsx index cd18283f..ebae8f36 100644 --- a/packages/journey-map/src/Chart/index.tsx +++ b/packages/journey-map/src/Chart/index.tsx @@ -43,9 +43,10 @@ const Chart: FC = ({ color = blue[2] }) => { padding: [24, -10, 16, -10], tooltip: { formatter: (datum) => { - if (!datum || !datum.emtion) return; + if (!datum) return; const { emotion } = datum; + if (typeof emotion === 'undefined') return; return { name: '情绪值', value: getFormattedEmotion(emotion) }; },