Skip to content

Commit 722af53

Browse files
committed
Use origSettings.context unless it's undefined; for that case use merged settings as context for backcompat with jQuery <1.3. Fixes #6727.
1 parent 4ac3a7c commit 722af53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ajax.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ jQuery.extend({
204204
var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings),
205205
jsonp, status, data, type = s.type.toUpperCase();
206206

207-
s.context = origSettings && origSettings.context || s;
207+
// Use original (not extended) context object if it was provided
208+
s.context = ( origSettings && origSettings.context !== undefined )? origSettings.context : s;
208209

209210
// convert data if not already a string
210211
if ( s.data && s.processData && typeof s.data !== "string" ) {

0 commit comments

Comments
 (0)