diff --git a/lib/instrument/visitors/class.js b/lib/instrument/visitors/class.js index 3a12b192..3d2cd6bc 100644 --- a/lib/instrument/visitors/class.js +++ b/lib/instrument/visitors/class.js @@ -99,7 +99,6 @@ function visitClass(classNode, parent, key, className, state) { // `super` block is child of name block as `extends` clause and method/property // computed keys can access class name, but not `super`. // NB: Binding for `super` target is created lazily when a use of `super` is encountered. - // TODO: Is moving `super` binding into inside class correct? const superBlock = createBlock(className, false, state); // Get block ID for inner name block in case it's needed @@ -109,8 +108,7 @@ function visitClass(classNode, parent, key, className, state) { state.isStrict = true; // Visit `extends` clause - const hasSuperClass = !!classNode.superClass; - if (hasSuperClass) { + if (classNode.superClass) { fn.hasSuperClass = true; visitKey(classNode, 'superClass', Expression, state); } diff --git a/lib/serialize/parseFunction.js b/lib/serialize/parseFunction.js index 3a17fe1e..3d55bde2 100644 --- a/lib/serialize/parseFunction.js +++ b/lib/serialize/parseFunction.js @@ -266,7 +266,6 @@ module.exports = function parseFunction( paramNodes = constructorNode ? constructorNode.params : []; // Replace `extends` clause with `extends class {}` - // TODO: Make sure prototypes get changed in all cases. if (isClassWithSuperClass) node.superClass = t.classExpression(null, null, t.classBody([])); } }