Changes between Initial Version and Version 4 of Ticket #12874
- Timestamp:
- Nov 29, 2012, 1:05:58 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12874
- Property Owner set to [email protected]…
-
Property
Status
changed from
new
topending
-
Property
Component
changed from
unfiled
todeferred
-
Property
Priority
changed from
undecided
tolow
-
Ticket #12874 – Description
initial v4 1 1 Hi, 2 2 3 I am working on a site and I am using backbonejs and requirejs and with r.js I create a bundled js file which contains all my js modularised. 3 4 4 5 If I make a simple ajax request and I even don't attach any event listener on it I get the following error after I receive the ajax response: 6 7 {{{ 5 8 Uncaught ReferenceError: add is not defined 6 9 jQuery.Callbacks.self.add.firingLength … … 12 15 done 13 16 jQuery.support.ajax.jQuery.ajaxTransport.send.callback 17 }}} 14 18 15 19 I have made some debugging and it seems that the problem is here: 20 {{{#!js 16 21 // First, we save the current length 17 var start = list.length; 18 (function add( args ) { 19 jQuery.each( args, function( _, arg ) { 20 var type = jQuery.type( arg ); 21 if ( type === "function" && ( !options.unique || !self.has( arg ) ) ) { 22 list.push( arg ); 23 } else if ( arg && arg.length && type !== "string" ) { 24 // Inspect recursively 25 add( arg ); 26 } 27 }); 28 })( arguments ); 22 var start = list.length; 23 (function add( args ) { 24 jQuery.each( args, function( _, arg ) { 25 var type = jQuery.type( arg ); 26 if ( type === "function" && ( !options.unique || !self.has( arg ) ) ) { 27 list.push( arg ); 28 } else if ( arg && arg.length && type !== "string" ) { 29 // Inspect recursively 30 add( arg ); 31 } 32 }); 33 })( arguments ); 34 }}} 29 35 30 36 This is in jquery.js at line 997. 37 31 38 It seems that the recursive call of the add method is not working. 39 32 40 This is how I made the ajax request: 41 {{{#!js 33 42 $.ajax(baseUrl+'query',{ 34 data:form.serialize(), 35 dataType: 'json', 36 type: 'post' 37 }); 43 data:form.serialize(), 44 dataType: 'json', 45 type: 'post' 46 }); 47 }}}