FIX #4952 : checked array before spread (#7027)

This commit is contained in:
Yash Vibhandik 2021-09-08 14:30:07 +05:30 committed by GitHub
parent e9f079ea03
commit 387ba66f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -937,7 +937,7 @@ class TableWidget extends BaseWidget<TableWidgetProps, WidgetState> {
handleRowClick = (rowData: Record<string, unknown>, index: number) => {
if (this.props.multiRowSelection) {
const selectedRowIndices = this.props.selectedRowIndices
const selectedRowIndices = Array.isArray(this.props.selectedRowIndices)
? [...this.props.selectedRowIndices]
: [];
if (selectedRowIndices.includes(index)) {