diff --git a/src/cellmanager.js b/src/cellmanager.js index 83b1781..b6599fe 100644 --- a/src/cellmanager.js +++ b/src/cellmanager.js @@ -391,8 +391,11 @@ export default class CellManager { clearSelection() { (this._selectedCells || []) - .forEach($cell => $cell.classList.remove('dt-cell--highlight')); - + .forEach($cell => { + if ($cell && $cell.classList) { + $cell.classList.remove('dt-cell--highlight'); + } + }); this._selectedCells = []; this.$selectionCursor = null; }