mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 17:45:59 +00:00
b8ff6212f8
Summary: I ran into this problem that `this` is undefined in `onreadystatechange` function calls while using this github api library: https://github.com/michael/github/blob/master/github.js#L72 It seems that in the browser, the `onreadystatechange` function expects `this` to be bound. This example on the xhr spec website can be seen using `this` similarly: https://xhr.spec.whatwg.org/#the-getresponseheader()-method Closes https://github.com/facebook/react-native/pull/5373 Reviewed By: svcscm Differential Revision: D2838940 Pulled By: nicklockwood fb-gh-sync-id: e42184887c7abb0af9c4358a5f33b8c97155624c