diff --git a/lib/6to5/transformation/helpers/replace-supers.js b/lib/6to5/transformation/helpers/replace-supers.js index d15d9c4f28..44e48aca95 100644 --- a/lib/6to5/transformation/helpers/replace-supers.js +++ b/lib/6to5/transformation/helpers/replace-supers.js @@ -48,7 +48,7 @@ ReplaceSupers.prototype.setSuperProperty = function (property, value, isStatic, ] ), isComputed ? property : t.literal(property.name), - t.identifier(value.name), + value, thisExpression ] ); diff --git a/test/fixtures/esnext/es6-classes/getter-setter-super.js b/test/fixtures/esnext/es6-classes/getter-setter-super.js index 5b9693298c..218ccbd2fe 100644 --- a/test/fixtures/esnext/es6-classes/getter-setter-super.js +++ b/test/fixtures/esnext/es6-classes/getter-setter-super.js @@ -26,8 +26,7 @@ class Cat extends Animal { } set name(val) { - super.name = val; - this._name += ' Cat'; + super.name = val + ' Cat'; } }