Use origSettings.context unless it's undefined; for that case use merged settings as context for backcompat with jQuery <1.3. Fixes #6727.

This commit is contained in:
Dave Methvin 2010-09-24 17:04:54 -04:00 committed by jeresig
parent 7862c45ad2
commit 395a032ad8

View file

@ -207,7 +207,9 @@ jQuery.extend({
jsonp, status, data, type = s.type.toUpperCase(); jsonp, status, data, type = s.type.toUpperCase();
s.url = s.url.replace( rhash, "" ); s.url = s.url.replace( rhash, "" );
s.context = origSettings && origSettings.context || s;
// Use original (not extended) context object if it was provided
s.context = origSettings && origSettings.context != null ? origSettings.context : s;
// convert data if not already a string // convert data if not already a string
if ( s.data && s.processData && typeof s.data !== "string" ) { if ( s.data && s.processData && typeof s.data !== "string" ) {