#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: |
Description
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 2.0.0.2 on linux.
To reproduce try this:
callme = function(response, callback){ var fn = function(response){ callback(response); }; console.dir(fn[0]); $.getJSON('/test/', fn); }; callme({empty:true}, function(response){ callme(response, function(){ console.log('done'); }); });
The second request looks like this:
GET http://localhost/test/?prototype=%5Bobject%20Object%5D
Change History (1)
comment:1 Changed 16 years ago by
Component: | ajax → core |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Fixed in SVN rev [1535].