Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility: regenerator-runtime #621

Closed
kumavis opened this issue Mar 17, 2021 · 1 comment
Closed

Compatibility: regenerator-runtime #621

kumavis opened this issue Mar 17, 2021 · 1 comment

Comments

@kumavis
Copy link
Member

kumavis commented Mar 17, 2021

conflict is Object.prototype.constructor

metamask-extension3/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js
https://npmfs.com/package/regenerator-runtime/0.11.1/runtime.js#L105

function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}

// This is a polyfill for %IteratorPrototype% for environments that
// don't natively support it.
var IteratorPrototype = {};
IteratorPrototype[iteratorSymbol] = function () {
  return this;
};

var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
if (NativeIteratorPrototype &&
    NativeIteratorPrototype !== Op &&
    hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  // This environment has a native %IteratorPrototype%; use it instead
  // of the polyfill.
  IteratorPrototype = NativeIteratorPrototype;
}

var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; // < ----------- explodes here 
@erights
Copy link
Contributor

erights commented Mar 17, 2021

Closing as won't fix. But see #576 (comment)
We should report this bug upstream to regenerator-runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants