dillon1000/react
Commit
Browse files Don't pass a null context to Function.prototype.call.
This prevents PhantomJS tests from hanging in the open-source React repo. Until the advent of `"use strict"`, passing `null` as the context object to `.call` or `.apply` resulted in `this` taking on the value of the global object inside the invoked function. Technically the `"use strict"` directive is supposed to make it possible that `this === null`, but strict mode is not respected by all browsers, including (unfortunately) PhantomJS. Since these `expect`-ations are just testing binding behavior, let's not make them also test strict mode `this` handling.
Changed paths1 file
First-parent comparisonsrc/core/__tests__/ReactCompositeComponent-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…