]> source.dussan.org Git - jquery.git/commitdiff
Tests: Fix Android 4.0 Deferred tests
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 12 Feb 2018 19:24:58 +0000 (20:24 +0100)
committerGitHub <noreply@github.com>
Mon, 12 Feb 2018 19:24:58 +0000 (20:24 +0100)
Closes gh-3967

test/unit/deferred.js

index 2e414e6423e997436b203654499c741b9d787877..70d1254a164ef76963644abf3c18cf2831cbd253 100644 (file)
@@ -884,7 +884,9 @@ QUnit.test( "jQuery.when(thenable) - like Promise.resolve", function( assert ) {
 
        var customToStringThen = {
                then: function( onFulfilled ) {
-                       onFulfilled();
+                       // Support: Android 4.0 only
+                       // Strict mode functions invoked without .call/.apply get global-object context
+                       onFulfilled.call();
                }
        };
        if ( typeof Symbol === "function" ) {