robinpowered / react-native-fetch-polyfill

Exposes options to React Native's XMLHttpRequest that are not accessible by `whatwg-fetch`
71 stars 23 forks source link

Bugfix - Undeclared `self` reference #2

Closed atticoos closed 7 years ago

atticoos commented 7 years ago

I made a derp before submitting when cleaning up the code.

In this file we added in the var support object from fetch, which we only need one thing from: support.blob. I previously wrote a function isBlobSupported, but realized I shouldn't be making changes like this -- we should pull in things as 1-1 as possible to make maintenance straight forward.

So I undid that change, brought back in support, and submitted. However in doing so, I overlooked that it relied on a reference to a variable named self, which we don't have defined here.

This adds the self variable and no longer crashes.