Skip to content

Commit

Permalink
fix as discussed in facebook#336
Browse files Browse the repository at this point in the history
  • Loading branch information
jvergeldedios committed May 3, 2018
1 parent 58c0eca commit 80b8dd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/regenerator-runtime/runtime-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// This method of obtaining a reference to the global object needs to be
// kept identical to the way it is obtained in runtime.js
var g = (function() { return this })() || Function("return this")();
var g = (function() { return this ? this : typeof self !== 'undefined' ? self : undefined})() || Function("return this")();

// Use `getOwnPropertyNames` because not all browsers support calling
// `hasOwnProperty` on the global `self` object in a worker. See #183.
Expand Down
2 changes: 1 addition & 1 deletion packages/regenerator-runtime/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,5 +723,5 @@
// In sloppy mode, unbound `this` refers to the global object, fallback to
// Function constructor if we're in global strict mode. That is sadly a form
// of indirect eval which violates Content Security Policy.
(function() { return this })() || Function("return this")()
(function() { return this ? this : typeof self !== 'undefined' ? self : undefined})() || Function("return this")()
);

0 comments on commit 80b8dd8

Please sign in to comment.