Skip to content

Commit

Permalink
Handle cases where self doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
billinghamj committed Jan 11, 2016
1 parent 43437dc commit d405743
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fetch-npm-browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
//
// Return that as the export for use in Webpack, Browserify etc.
require('whatwg-fetch');
module.exports = self.fetch.bind(self);
var global = this.self || this;
module.exports = global.fetch.bind(global);

0 comments on commit d405743

Please sign in to comment.