Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#1026 closed bug (fixed)

isFunction with recursive ajax request

Reported by: teemow Owned by:
Priority: major Milestone: 1.1.3
Component: core Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:


If I use the short version of jQuery.get (second parameter is callback function) recursively, the second request gets an object as get parameter which is the response of the first request.

This is caused by isFunction. It checks typeof fn[0] == 'undefined' which is false in case of the second request.

I found this error in firefox on linux.

To reproduce try this:

callme = function(response, callback){
    var fn = function(response){
    $.getJSON('/test/', fn);

callme({empty:true}, function(response){
    callme(response, function(){

The second request looks like this:

GET http://localhost/test/?prototype=%5Bobject%20Object%5D

Change History (1)

comment:1 Changed 16 years ago by john

Component: ajaxcore
Resolution: fixed
Status: newclosed

Fixed in SVN rev [1535].

Note: See TracTickets for help on using tickets.