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

Fix: Treat null the same as an empty string for type detection - i.e. don't try to detect a type on it. Regression picked up by unit tests

This commit is contained in:
Allan Jardine 2011-05-28 11:06:38 +01:00
parent 53908784fe
commit e769731746

View File

@ -725,7 +725,7 @@
{
return 'numeric';
}
else if ( sData === null || typeof sData != 'string' )
else if ( typeof sData != 'string' )
{
return null;
}
@ -2691,7 +2691,7 @@
{
/* Attempt to auto detect the type - same as _fnGatherData() */
var sVarType = _fnGetCellData( oSettings, iRow, i, 'type' );
if ( sVarType !== '' )
if ( sVarType !== null && sVarType !== '' )
{
sThisType = _fnDetectType( sVarType );
if ( oCol.sType === null )