mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 12:48:04 +08:00
fix(components): [table] throw error when no matching column (#9682)
* Cannot read properties of null (reading 'id') * fix(components): [table] fix Cannot read properties of null (reading 'id')
This commit is contained in:
parent
2dc30791a0
commit
6218e4ddc5
@ -2,7 +2,7 @@
|
||||
import { createPopper } from '@popperjs/core'
|
||||
import { get } from 'lodash-unified'
|
||||
import escapeHtml from 'escape-html'
|
||||
import { hasOwn } from '@element-plus/utils'
|
||||
import { hasOwn, throwError } from '@element-plus/utils'
|
||||
import { useZIndex } from '@element-plus/hooks'
|
||||
import type {
|
||||
IPopperOptions,
|
||||
@ -120,6 +120,8 @@ export const getColumnByKey = function <T>(
|
||||
break
|
||||
}
|
||||
}
|
||||
if (!column)
|
||||
throwError('ElTable', `No column matching with column-key: ${columnKey}`)
|
||||
return column
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user