better destructuring AssignmentExpression error message
This commit is contained in:
@@ -149,7 +149,7 @@ exports.ExpressionStatement = function (node, parent, file, scope) {
|
||||
exports.AssignmentExpression = function (node, parent, file) {
|
||||
if (parent.type === "ExpressionStatement") return;
|
||||
if (!t.isPattern(node.left)) return;
|
||||
throw file.errorWithNode(node, "AssignmentExpression destructuring outside of a ExpressionStatement is forbidden due to current limitations");
|
||||
throw file.errorWithNode(node, "AssignmentExpression destructuring outside of a ExpressionStatement is forbidden due to current 6to5 limitations");
|
||||
};
|
||||
|
||||
exports.VariableDeclaration = function (node, parent, file, scope) {
|
||||
|
||||
Reference in New Issue
Block a user