Opened 12 years ago
Closed 12 years ago
#7186 closed bug (worksforme)
Possible incorrect dataType is set in .get()
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.3 |
Component: | unfiled | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Looking at this section of code:
get: function( url, data, callback, type ) { // shift arguments if data argument was omited if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; data = null; } return jQuery.ajax({ type: "GET", url: url, data: data, success: callback, dataType: type }); },
NOTE:
type = type || callback;
Should this be: type = type || type = callback;
or just type = callback;
?
Do I miss something?
Thanks for great work!
Note: See
TracTickets for help on using
tickets.
It's playing safe with the parameter hockey there, in case someone passed null in the callback arg rather than leaving it out. So these are all equivalent: