mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-05 11:21:11 +08:00
fix(talbe): null check error (#1807)
This commit is contained in:
parent
6582b7cdbc
commit
ee7e9c0a00
@ -32,7 +32,7 @@ function useLayoutObserver(root: Table) {
|
|||||||
return layout
|
return layout
|
||||||
})
|
})
|
||||||
const onColumnsChange = (layout: TableLayout) => {
|
const onColumnsChange = (layout: TableLayout) => {
|
||||||
const cols = root.vnode.el?.querySelectorAll('colgroup > col')
|
const cols = root.vnode.el?.querySelectorAll('colgroup > col') || []
|
||||||
if (!cols.length) return
|
if (!cols.length) return
|
||||||
const flattenColumns = layout.getFlattenColumns()
|
const flattenColumns = layout.getFlattenColumns()
|
||||||
const columnsMap = {}
|
const columnsMap = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user