regenerator-runtime
Advanced tools
Comparing version 0.13.8 to 0.13.9
@@ -5,3 +5,3 @@ { | ||
"description": "Runtime for Regenerator-compiled generator and async functions.", | ||
"version": "0.13.8", | ||
"version": "0.13.9", | ||
"main": "runtime.js", | ||
@@ -17,5 +17,5 @@ "keywords": [ | ||
"type": "git", | ||
"url": "https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime" | ||
"url": "https://github.com/facebook/regenerator/tree/master/packages/runtime" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -741,3 +741,4 @@ /** | ||
// assignment should always work unless something is misconfigured. Just | ||
// in case runtime.js accidentally runs in strict mode, we can escape | ||
// in case runtime.js accidentally runs in strict mode, in modern engines | ||
// we can explicitly access globalThis. In older engines we can escape | ||
// strict mode using a global Function call. This could conceivably fail | ||
@@ -749,3 +750,7 @@ // if a Content Security Policy forbids using Function, but in that case | ||
// problems, please detail your unique predicament in a GitHub issue. | ||
Function("r", "regeneratorRuntime = r")(runtime); | ||
if (typeof globalThis === "object") { | ||
globalThis.regeneratorRuntime = runtime; | ||
} else { | ||
Function("r", "regeneratorRuntime = r")(runtime); | ||
} | ||
} |
27401
651