regenerator-runtime
Advanced tools
Comparing version 0.13.5 to 0.13.6
@@ -5,3 +5,3 @@ { | ||
"description": "Runtime for Regenerator-compiled generator and async functions.", | ||
"version": "0.13.5", | ||
"version": "0.13.6", | ||
"main": "runtime.js", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
@@ -85,2 +85,9 @@ /** | ||
function ensureDefaultToStringTag(object, defaultValue) { | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1644581#c6 | ||
return toStringTagSymbol in object | ||
? object[toStringTagSymbol] | ||
: object[toStringTagSymbol] = defaultValue; | ||
} | ||
var Gp = GeneratorFunctionPrototype.prototype = | ||
@@ -90,4 +97,6 @@ Generator.prototype = Object.create(IteratorPrototype); | ||
GeneratorFunctionPrototype.constructor = GeneratorFunction; | ||
GeneratorFunctionPrototype[toStringTagSymbol] = | ||
GeneratorFunction.displayName = "GeneratorFunction"; | ||
GeneratorFunction.displayName = ensureDefaultToStringTag( | ||
GeneratorFunctionPrototype, | ||
"GeneratorFunction" | ||
); | ||
@@ -119,5 +128,3 @@ // Helper for defining the .next, .throw, and .return methods of the | ||
genFun.__proto__ = GeneratorFunctionPrototype; | ||
if (!(toStringTagSymbol in genFun)) { | ||
genFun[toStringTagSymbol] = "GeneratorFunction"; | ||
} | ||
ensureDefaultToStringTag(genFun, "GeneratorFunction"); | ||
} | ||
@@ -392,3 +399,3 @@ genFun.prototype = Object.create(Gp); | ||
Gp[toStringTagSymbol] = "Generator"; | ||
ensureDefaultToStringTag(Gp, "Generator"); | ||
@@ -395,0 +402,0 @@ // A Generator should always return itself as the iterator object when the |
26982
633