Skip to content

Commit

Permalink
Fix: Row invalidation would throw an error when reading from a DOM row
Browse files Browse the repository at this point in the history
- Fixes DataTables/DataTables #623
  • Loading branch information
Allan Jardine committed Aug 17, 2015
1 parent 1be8c05 commit 7b14969
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions js/core/core.data.js
Expand Up @@ -656,9 +656,14 @@ function _fnGetRowElements( settings, row, colIdx, d )
}

// Read the ID from the DOM if present
var id = row.getAttribute( 'id' );
if ( id ) {
_fnSetObjectDataFn( settings.rowId )( d, id );
var rowNode = td ? row : row.nTr;

if ( rowNode ) {
var id = rowNode.getAttribute( 'id' );

if ( id ) {
_fnSetObjectDataFn( settings.rowId )( d, id );
}
}

return {
Expand Down

0 comments on commit 7b14969

Please sign in to comment.