Skip to content

Commit

Permalink
Fixed: Unit test 4_serveri-side "Filter 'nothinghere' - info" was fai…
Browse files Browse the repository at this point in the history
…ling as the information element of the table was incorrectly reporting that "1" record was being shown (start) when the filter applies ensured that no records were actually being shown. This was due to a strong type check against a string/number returned from the server-side processing script and a number/0. Fix is to parseInt().
  • Loading branch information
Allan Jardine committed Oct 17, 2010
1 parent 4e11bf9 commit fe6b045
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions media/js/jquery.dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@
this.fnRecordsTotal = function ()
{
if ( this.oFeatures.bServerSide ) {
return this._iRecordsTotal;
return parseInt(this._iRecordsTotal, 10);
} else {
return this.aiDisplayMaster.length;
}
Expand All @@ -865,7 +865,7 @@
this.fnRecordsDisplay = function ()
{
if ( this.oFeatures.bServerSide ) {
return this._iRecordsDisplay;
return parseInt(this._iRecordsDisplay, 10);
} else {
return this.aiDisplay.length;
}
Expand Down

0 comments on commit fe6b045

Please sign in to comment.