Properly regenerate scope for replaced nodes - fixes #1773
This commit is contained in:
parent
7cb7ea4248
commit
3f38a83600
@ -146,7 +146,7 @@ export default class Scope {
|
||||
}
|
||||
|
||||
var cached = path.getData("scope");
|
||||
if (cached && cached.parent === parent) {
|
||||
if (cached && cached.parent === parent && cached.block === path.node) {
|
||||
return cached;
|
||||
} else {
|
||||
path.setData("scope", this);
|
||||
|
||||
@ -10,3 +10,12 @@ class Foo extends Bar {
|
||||
this.state = "test";
|
||||
}
|
||||
}
|
||||
|
||||
class ConstructorScoping {
|
||||
constructor(){
|
||||
let bar;
|
||||
{
|
||||
let bar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,3 +17,12 @@ var Foo = (function (_Bar) {
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
return Foo;
|
||||
})(Bar);
|
||||
|
||||
var ConstructorScoping = function ConstructorScoping() {
|
||||
babelHelpers.classCallCheck(this, ConstructorScoping);
|
||||
|
||||
var bar = undefined;
|
||||
{
|
||||
var _bar = undefined;
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user