Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deferred: Use typeof instead of isFunction #3597

Closed
wants to merge 1 commit into from

Commits on Mar 31, 2017

  1. Deferred: Use typeof instead of isFunction

    jQuery's Deferred is expected to be a close approximation to Promise of
    ECMAScript 2016 Language Specification. Promise defined in ECMAScript 2016
    tests onFulfilled, onRejected and then are objects with [[Call]].
    
    However, isFunction, used in the Deferred, tests toStringTag, which is
    irrelevant from the definition. As the result, Deferred shows different
    behaviors for some objects such as GeneratorFunction.
    
    This fix uses typeof operator, which will test the given value is an
    objects with [[Call]], instead.
    akihikodaki committed Mar 31, 2017
    Copy the full SHA
    45f82af View commit details
    Browse the repository at this point in the history