diff --git a/Alloy/commands/compile/ast/handle-alloy-globals.js b/Alloy/commands/compile/ast/handle-alloy-globals.js index e0e6b114b..8aec620fd 100644 --- a/Alloy/commands/compile/ast/handle-alloy-globals.js +++ b/Alloy/commands/compile/ast/handle-alloy-globals.js @@ -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)