1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Dev fix: The last change for fnAddData was incorrect - it would mean that objects couldn't be added...

This commit is contained in:
Allan Jardine 2012-01-20 17:39:37 +00:00
parent 139f33603a
commit e7bba4bcbe
2 changed files with 2 additions and 2 deletions

View File

@ -4898,7 +4898,7 @@
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ); var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
/* Check if we want to add multiple rows or not */ /* Check if we want to add multiple rows or not */
if ( $.isArray(mData[0]) ) if ( typeof mData[0] === "object" && mData[0] !== null )
{ {
for ( var i=0 ; i<mData.length ; i++ ) for ( var i=0 ; i<mData.length ; i++ )
{ {

View File

@ -157,7 +157,7 @@ this.fnAddData = function( mData, bRedraw )
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ); var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
/* Check if we want to add multiple rows or not */ /* Check if we want to add multiple rows or not */
if ( $.isArray(mData[0]) ) if ( typeof mData[0] === "object" && mData[0] !== null )
{ {
for ( var i=0 ; i<mData.length ; i++ ) for ( var i=0 ; i<mData.length ; i++ )
{ {