Skip to content

Commit 36e53e4

Browse files
fix: Stop error occuring when cells().deselect() get's called
1 parent 66482f9 commit 36e53e4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

js/dataTables.select.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,9 @@ apiRegisterPlural( 'cells().deselect()', 'cell().deselect()', function () {
10921092
this.iterator( 'cell', function ( ctx, rowIdx, colIdx ) {
10931093
var data = ctx.aoData[ rowIdx ];
10941094

1095-
data._selected_cells[ colIdx ] = false;
1095+
if(data._selected_cells !== undefined) {
1096+
data._selected_cells[ colIdx ] = false;
1097+
}
10961098

10971099
// Remove class only if the cells exist, and the cell is not column
10981100
// selected, in which case the class should remain (since it is selected

0 commit comments

Comments
 (0)