only register an Identifier node as static if it's a constant
This commit is contained in:
parent
b97dc4778b
commit
495b880372
@ -376,8 +376,13 @@ export default class Scope {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (t.isIdentifier(node) && this.hasBinding(node.name)) {
|
||||
return true;
|
||||
if (t.isIdentifier(node)) {
|
||||
var binding = this.getBinding(node.name);
|
||||
if (binding) {
|
||||
return binding.constant;
|
||||
} else {
|
||||
return this.hasBinding(node.name);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user