From e769731746907e1f8bf97a77b0453f462c4f1bfc Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Sat, 28 May 2011 11:06:38 +0100 Subject: [PATCH] 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 --- media/js/jquery.dataTables.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index c6f5bb9e..f86a62dc 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -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 )