Skip to content

Commit

Permalink
Fix: dt-api destroy() when a child row was shown resulted in a JS e…
Browse files Browse the repository at this point in the history
…rror

See thread 23516 for more information
  • Loading branch information
Allan Jardine committed Sep 22, 2014
1 parent c521c1e commit 0b24737
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/api/api.row.details.js
Expand Up @@ -44,12 +44,12 @@ var __details_add = function ( ctx, row, data, klass )
};


var __details_remove = function ( api )
var __details_remove = function ( api, idx )
{
var ctx = api.context;

if ( ctx.length && api.length ) {
var row = ctx[0].aoData[ api[0] ];
if ( ctx.length ) {
var row = ctx[0].aoData[ idx !== undefined ? idx : api[0] ];

if ( row._details ) {
row._details.remove();
Expand Down Expand Up @@ -138,7 +138,7 @@ var __details_events = function ( settings )

for ( var i=0, ien=data.length ; i<ien ; i++ ) {
if ( data[i]._details ) {
__details_remove( data[i] );
__details_remove( api, i );
}
}
} );
Expand Down

0 comments on commit 0b24737

Please sign in to comment.