remap top level this to undefined - #562
This commit is contained in:
@@ -17,5 +17,5 @@ exports.FunctionExpression = function (node, parent, scope, context) {
|
||||
};
|
||||
|
||||
exports.ThisExpression = function (node, parent, scope, context, file) {
|
||||
throw file.errorWithNode(node, "Top level `this` is `undefined` in strict mode", ReferenceError);
|
||||
return t.identifier("undefined");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user