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(compatibility): 传值 dom 校验 style 属性 #66

Closed
wants to merge 189 commits into from

Conversation

billfeller
Copy link

@billfeller billfeller commented Sep 3, 2021

使用 @ant-design/charts 偶现从底层依赖库报错
Uncaught TypeError: Cannot read property 'marginBottom' of undefined

环境:Windows 7
浏览器:BIDUBrowser 6

hustcc and others added 24 commits April 23, 2020 12:53
refactor(gl-matrix): 删除覆盖的方法,使用新的 export 语法
fix(matrix): 修复部分 TypeScript 版本不支持 export * 的问题
 - @antv/color-util@2.0.5
 - @antv/matrix-util@3.0.3
 - @antv/path-util@2.0.8
 - @antv/util@2.0.9
refactor(marix-util): 将 matrix-util 扩展的方法同 gl-matrix 的命名空间平级导出
* feat: add util of get-max and get-min value

* test: 添加 max、min单测

* fix(get-range): 使用max、min获取最大最小值

* chore: update @antv/util to 2.0.11

* feat(omit): add a util of omit & add testcase
* chore: add ci

* Update build.yml

* chore: update build
* perf(uniq): perf fo uniq function

* chore: groupBy

* chore: 2.0.12

* perf: use for loop replace for of
* fix: maxBy minBy for empty data

* chore: fix typo

* chore: fix unit test

* chore: fix unit test
使用 @ant-design/charts 偶现从底层依赖库报错,兼容下
Uncaught TypeError: Cannot read property 'marginBottom' of undefined
@@ -1,5 +1,5 @@
export default function modifyCSS(dom: HTMLElement, css: { [key:string]: any }): HTMLElement {
if (dom) {
if (dom && dom.style) {
Copy link
Member

Choose a reason for hiding this comment

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

加一个单侧吧,感谢~~~

Copy link
Author

Choose a reason for hiding this comment

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

已补充单测

@@ -1,5 +1,5 @@
export default function modifyCSS(dom: HTMLElement, css: { [key:string]: any }): HTMLElement {
if (dom) {
if (dom && dom.style) {
Copy link
Member

Choose a reason for hiding this comment

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

理论上,modifyCSS 如果 dom.style 为空,应该让其设置为 dom.style = {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.