Fresh user - possible Bug in 1.5.6 on IE7/IE8

Fresh user - possible Bug in 1.5.6 on IE7/IE8

pierre_malletpierre_mallet Posts: 2Questions: 0Answers: 0
edited January 2010 in General
Hello, i first apologize for my english. I just had a problem on line 701 in jquery.dataTables.js

[code]
function ( sData )
{
/* Snaity check that we are dealing with a string or quick return for a number */
if ( typeof sData == 'number' )
{
return 'numeric';
}
else if ( typeof sData.charAt != 'function' ) <= here was the problem
{
return null;
}
[/code]

I replaced "typeof sData.charAt != 'function'' by "typeof sData != 'function'" and i worked fine.
I'm sorry if i'm in the wrong place for post that.

Thanks for this plugin.

Regards
Pierre Mallet

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Hi Pierre,

    Right place to post it - thanks for doing so :-)

    I'm not sure I understand what the problem is though. The condition says, if sData does not have a method called "charAt" then we cannot possible consider it a string - which we can't. Having said that, perhaps the check should actually be "typeof sData == 'string'"...

    Regards,
    Allan
  • pierre_malletpierre_mallet Posts: 2Questions: 0Answers: 0
    Thanks for your explanation.

    Regards,
    Pierre Mallet
This discussion has been closed.