Skip to content

Commit

Permalink
Fix Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed Jun 17, 2018
1 parent a21cee5 commit b3609f7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/browser-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
* @returns {boolean} True if the value for obj[key] is defined.
*/
const isDefined = (object, key) => {
if (object === window && window !== this) {
object = this;
}
if (typeof object !== "object" || object === null) {
return false;
}
Expand Down Expand Up @@ -525,7 +528,7 @@ if (!isDefined(window, "browser") || !(() => {

// The build process adds a UMD wrapper around this file, which makes the
// `module` variable available.
module.exports = wrapAPIs(window.browser || window.chrome); // eslint-disable-line no-undef
module.exports = wrapAPIs(browser || chrome); // eslint-disable-line no-undef
} else {
module.exports = window.browser; // eslint-disable-line no-undef
module.exports = browser; // eslint-disable-line no-undef
}

0 comments on commit b3609f7

Please sign in to comment.