Skip to content

Commit

Permalink
fix(compile): correctly obtain node name
Browse files Browse the repository at this point in the history
Fixes ALOY-1633
  • Loading branch information
ewanharris committed Nov 20, 2019
1 parent 32895a7 commit e638e55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Alloy/commands/compile/ast/handle-alloy-globals.js
Expand Up @@ -26,7 +26,7 @@ module.exports = function(babel) {
checkStatement(node.source.value, state);
},
ReferencedIdentifier(path) {
const name = path.name;
const name = path.node.name;
if (ALLOY_GLOBALS_TO_CHECK.includes(name) // Is this identifier one of the special 3
&& !this.required.includes(name) // Have we already imported it
&& !path.scope.hasBinding(name) // Does this binding already exist in the scope? (e.g user might import lodash as _ which we don't want to override)
Expand Down

0 comments on commit e638e55

Please sign in to comment.