Skip to content

Commit

Permalink
fix(mozilla addons support): fix obtaining global object (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
qzb authored and benlesh committed Oct 11, 2016
1 parent 73aa9bf commit 38da34d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions es/index.js
@@ -1,11 +1,16 @@
/* global window */
import ponyfill from './ponyfill';

var root = this;
if (typeof global !== 'undefined') {
root = global;
var root = module;

if (typeof self !== 'undefined') {
root = self;
} else if (typeof window !== 'undefined') {
root = window;
root = window;
} else if (typeof global !== 'undefined') {
root = global;
} else {
root = Function('return this')();
}

var result = ponyfill(root);
Expand Down

0 comments on commit 38da34d

Please sign in to comment.