aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/deferred.js5
-rw-r--r--test/unit/deferred.js5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/deferred.js b/src/deferred.js
index 91c55a64e..0ea1e7f1f 100644
--- a/src/deferred.js
+++ b/src/deferred.js
@@ -354,7 +354,10 @@ jQuery.extend( {
master.reject
);
} else {
- updateFunc( i )( resolveValues[ i ] );
+
+ // Support: Android 4.0 only
+ // Strict mode functions invoked without .call/.apply get global-object context
+ updateFunc( i ).call( undefined, resolveValues[ i ] );
}
}
diff --git a/test/unit/deferred.js b/test/unit/deferred.js
index af237acf4..305740fa4 100644
--- a/test/unit/deferred.js
+++ b/test/unit/deferred.js
@@ -843,7 +843,10 @@ QUnit.test( "jQuery.when - joined", function( assert ) {
rejectedStandardPromise: true
},
counter = 49,
- expectedContext = (function() { "use strict"; return this; })();
+
+ // Support: Android 4.0 only
+ // Strict mode functions invoked without .call/.apply get global-object context
+ expectedContext = (function() { "use strict"; return this; }).call();
QUnit.stop();