Thanks for the proposition. But this is not a valid fix, it's a patch.

We probably need to rewrite the whole detection approach. It's not
simple as it must support many cases, and reject many as well.


Cheers
--
Ariel Flesler
http://flesler.blogspot.com

On 15 jul, 11:19, Ricardo Ferreira
<[EMAIL PROTECTED]> wrote:
> Hi,
> I came up with this problem, and managed to get a fix to it. I am
> using jquery-1.2.6.
>
> Follows the code of the makeArray function:
>
>         makeArray: function( array ) {
>                 var ret = [];
>
>                 if( array != null ){
>                         var i = array.length;
>                         //the window, strings and functions also have 'length'
>                         if( i == null || array.split || array.setInterval || 
> (array.call &&
> array.call != Array.prototype.call) )
>                                 ret[0] = array;
>                         else
>                                 while( i )
>                                         ret[--i] = array[i];
>                 }
>
>                 return ret;
>         }
>
> Here is the fix:
> if ( ... (array.call && array.call != Array.prototype.call) )
> before it was:
> if ( ... array.call )
>
> Basically what I did was only to test whether array.call was defined
> and make sure it is not Array.prototype.call, so that branch will only
> be true if "array" is a function
>
> With this quick fix, the test case inhttp://dev.jquery.com/ticket/3129
> obtains the expected result.
>
> Hope this helps
> Bye

Reply via email to