diff --git a/media/src/DataTables.js b/media/src/DataTables.js index 989249b0..88729d5f 100644 --- a/media/src/DataTables.js +++ b/media/src/DataTables.js @@ -78,9 +78,11 @@ require('api.internal.js'); var _that = this; - return this.each(function() { + this.each(function() { require('core.constructor.js'); } ); + _that = null; + return this; }; require('api.static.js'); diff --git a/media/src/api/api.methods.js b/media/src/api/api.methods.js index 48fae739..6773873c 100644 --- a/media/src/api/api.methods.js +++ b/media/src/api/api.methods.js @@ -474,20 +474,23 @@ this.fnDestroy = function ( bRemove ) var nBody = oSettings.nTBody; var i, iLen; - bRemove = (bRemove===undefined) ? false : true; + bRemove = (bRemove===undefined) ? false : bRemove; /* Flag to note that the table is currently being destroyed - no action should be taken */ oSettings.bDestroying = true; /* Fire off the destroy callbacks for plug-ins etc */ _fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] ); - - /* Restore hidden columns */ - for ( i=0, iLen=oSettings.aoColumns.length ; i