-
Notifications
You must be signed in to change notification settings - Fork 27
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
Conversation
Resolution
refactor(gl-matrix): 删除覆盖的方法,使用新的 export 语法
fix(matrix): 修复部分 TypeScript 版本不支持 export * 的问题
refactor(marix-util): 将 matrix-util 扩展的方法同 gl-matrix 的命名空间平级导出
feat(matrix): export more methods
fix: remove lib import
* 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
packages/dom-util/src/modify-css.ts
Outdated
@@ -1,5 +1,5 @@ | |||
export default function modifyCSS(dom: HTMLElement, css: { [key:string]: any }): HTMLElement { | |||
if (dom) { | |||
if (dom && dom.style) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加一个单侧吧,感谢~~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已补充单测
packages/dom-util/src/modify-css.ts
Outdated
@@ -1,5 +1,5 @@ | |||
export default function modifyCSS(dom: HTMLElement, css: { [key:string]: any }): HTMLElement { | |||
if (dom) { | |||
if (dom && dom.style) { |
There was a problem hiding this comment.
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 = {}
使用 @ant-design/charts 偶现从底层依赖库报错
Uncaught TypeError: Cannot read property 'marginBottom' of undefined
环境:Windows 7
浏览器:BIDUBrowser 6