Apply location data fix to decorators plugin (#699)
This commit is contained in:
committed by
Justin Ridgewell
parent
8f2f250144
commit
acf0e65090
@@ -199,9 +199,7 @@ export default class StatementParser extends ExpressionParser {
|
||||
];
|
||||
if (decorators.length) {
|
||||
node.decorators = decorators;
|
||||
if (this.hasPlugin("decorators2")) {
|
||||
this.resetStartLocationFromNode(node, decorators[0]);
|
||||
}
|
||||
this.resetStartLocationFromNode(node, decorators[0]);
|
||||
this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
|
||||
}
|
||||
}
|
||||
@@ -891,9 +889,7 @@ export default class StatementParser extends ExpressionParser {
|
||||
// steal the decorators if there are any
|
||||
if (decorators.length) {
|
||||
member.decorators = decorators;
|
||||
if (this.hasPlugin("decorators2")) {
|
||||
this.resetStartLocationFromNode(member, decorators[0]);
|
||||
}
|
||||
this.resetStartLocationFromNode(member, decorators[0]);
|
||||
decorators = [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user