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: cannot find document if group destroyed #5870

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

lijinke666
Copy link
Member

Checklist
  • npm test passes
  • benchmarks are included
  • commit message follows commit guidelines
  • documents are updated
Description of change

for renderToMountedElement func.

if cell is dynamic render, and removed outside of the viewport. G2 cannot find document

  1. add canvas document default value
  2. add plot type validate
curve.ts:113 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'createElement')

render.ts:149 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'defaultView')
Before After
image image

@pearmini
Copy link
Member

pearmini commented Dec 4, 2023

这个 case 的测试不太好加,所以就不用加测试。

src/runtime/render.ts Outdated Show resolved Hide resolved
Copy link
Member

@pearmini pearmini left a comment

Choose a reason for hiding this comment

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

剩下的类型问题我提一个 PR 解决。

src/runtime/library.ts Show resolved Hide resolved
@pearmini pearmini merged commit c78da52 into antvis:v5 Dec 5, 2023
2 of 3 checks passed
@pearmini pearmini mentioned this pull request Dec 5, 2023
@lijinke666 lijinke666 deleted the fix-miss-document branch December 5, 2023 03:28
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