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

2.16.1版本中渲染图元时,x6-cmmon@2.0.17依赖中的text()方法报错,从undefined中读取了toUpperCase方法。 #4277

Open
lessgeek opened this issue Apr 25, 2024 · 2 comments

Comments

@lessgeek
Copy link

Describe the bug

在x6-common@2.0.17版本中的\es\dom\text.js代码中,图元渲染进入文本处理方法text(),没有进行undefined的场景处理导致程序报错。
报错代码片段

Your Example Website or App

no

Steps to Reproduce the Bug or Issue

  1. 渲染以下DOM结构的图元:
    渲染报错的图元结构

  2. 在V2.16.1版本X6中引用的以下x6-commom代码报错:
    报错代码片段

Expected behavior

可以正常渲染标题结构的图元,不要出现以下报错:
报错信息

Screenshots or Videos

No response

Platform

  • OS: [Windows]
  • Browser: [Chrome V123.0.6312.106]
  • Version: [e.g. 2.16.1]

Additional context

No response

@lessgeek
Copy link
Author

查看一下@antv/x6-common/es/dom/text.js文件的修改记录,应该是没有考虑到childNodes返回的第1个节点可能是文本,文本没有tagName导致的,能否在新版本修复以下。

修改记录:075f540

@lessgeek
Copy link
Author

请问可以兼容以下N.tagName是undefined的情况么?会导致图元不能正常渲染了 @NewByVector

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

No branches or pull requests

1 participant