Merge pull request #1901 from loganfsmyth/constructor-scope-fix

Properly regenerate scope for replaced nodes - fixes #1773
This commit is contained in:
Sebastian McKenzie
2015-07-02 23:54:28 +02:00
3 changed files with 20 additions and 2 deletions

View File

@@ -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);