1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-12-02 14:24:11 +01:00

Fix: Made a mistake when updating the conditionals for fnFilter and fnGetData when considering rows. if ( 0 ) is of course false - so passing in an integer isn't valid - need to check for undefined - 7997

This commit is contained in:
Allan Jardine 2012-01-07 12:55:28 +00:00
parent 7ba7027ee8
commit 2f729af697
2 changed files with 7 additions and 7 deletions

View File

@ -4920,7 +4920,7 @@
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
if ( bRedraw )
if ( bRedraw === undefined || bRedraw )
{
_fnReDraw( oSettings );
}
@ -5300,7 +5300,7 @@
bCaseInsensitive = true;
}
if ( !iColumn )
if ( iColumn === undefined || iColumn === null )
{
/* Global filter */
_fnFilterComplete( oSettings, {
@ -5370,7 +5370,7 @@
var iRow = (typeof mRow === 'object') ?
_fnNodeToDataIndex(oSettings, mRow) : mRow;
if ( iCol )
if ( iCol !== undefined )
{
return _fnGetCellData( oSettings, iRow, iCol, '' );
}
@ -5400,7 +5400,7 @@
{
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
return (iRow) ?
return (iRow !== undefined) ?
oSettings.aoData[iRow].nTr :
_fnGetTrNodes( oSettings );
};

View File

@ -561,7 +561,7 @@ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseIns
bCaseInsensitive = true;
}
if ( !iColumn )
if ( iColumn === undefined || iColumn === null )
{
/* Global filter */
_fnFilterComplete( oSettings, {
@ -631,7 +631,7 @@ this.fnGetData = function( mRow, iCol )
var iRow = (typeof mRow === 'object') ?
_fnNodeToDataIndex(oSettings, mRow) : mRow;
if ( iCol )
if ( iCol !== undefined )
{
return _fnGetCellData( oSettings, iRow, iCol, '' );
}
@ -661,7 +661,7 @@ this.fnGetNodes = function( iRow )
{
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
return (iRow) ?
return (iRow !== undefined) ?
oSettings.aoData[iRow].nTr :
_fnGetTrNodes( oSettings );
};