Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(line): 数据为空时,图表更新渲染失败 #1565

Merged
merged 2 commits into from
Aug 22, 2022

Conversation

mshmyw
Copy link
Collaborator

@mshmyw mshmyw commented Aug 19, 2022

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Description of change

@mshmyw mshmyw requested a review from zengyue August 19, 2022 15:49
@mshmyw mshmyw force-pushed the fix/chart-update-empty-data branch from 0c2ff79 to 3d69315 Compare August 22, 2022 05:56
@@ -394,7 +394,9 @@ class Geometry<
...defaultAttrValues,
};
const firstChild = children[0];

if(!firstChild) {
Copy link
Member

Choose a reason for hiding this comment

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

这个判断感觉用 children.length === 0 会比较合理吧?

@mshmyw mshmyw force-pushed the fix/chart-update-empty-data branch from 46d7ba8 to 96fdd48 Compare August 22, 2022 06:44
@zengyue zengyue merged commit d5eeee7 into master Aug 22, 2022
@zengyue zengyue deleted the fix/chart-update-empty-data branch August 22, 2022 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants