Skip to content

Commit

Permalink
🐛 fix: 修正 emotion 为空时的渲染错误
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Apr 11, 2021
1 parent 3ee8fb6 commit 307cc53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/journey-map/src/Chart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ const Chart: FC<ChartProps> = ({ 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) };
},
Expand Down

1 comment on commit 307cc53

@vercel
Copy link

@vercel vercel bot commented on 307cc53 Apr 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.