add note about member expression resolution
This commit is contained in:
parent
080a844457
commit
9676056f08
@ -209,7 +209,7 @@ class ClassTransformer {
|
||||
}
|
||||
|
||||
// we have no constructor, we have a super, and the super doesn't appear to be falsy
|
||||
if (!this.hasConstructor && this.hasSuper && this.path.get("superClass").evaluateTruthy() !== false) {
|
||||
if (!this.hasConstructor && this.hasSuper) {
|
||||
var helperName = "class-super-constructor-call";
|
||||
if (this.isLoose) helperName += "-loose";
|
||||
constructor.body.body.push(util.template(helperName, {
|
||||
|
||||
@ -277,9 +277,12 @@ export default class TraversalPath {
|
||||
if (binding.path === this) {
|
||||
return this;
|
||||
} else {
|
||||
return binding.path.resolve();;
|
||||
return binding.path.resolve();
|
||||
}
|
||||
} else if (this.isMemberExpression()) {
|
||||
// this is dangerous, as non-direct target assignments will mutate it's state
|
||||
// making this resolution inaccurate
|
||||
|
||||
var targetKey = this.toComputedKey();
|
||||
if (!t.isLiteral(targetKey)) return;
|
||||
var targetName = targetKey.value;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user