fix(babel-parser): chain off optionally chained keys named cla… (#11198)
* fix(babel-parser): chain off optionally chained keys named class and function Fixes #11197 * Extract override as variable to satisfy typechecker Flow did not trust that curContext.override would be defined
This commit is contained in:
@@ -233,8 +233,9 @@ export default class Tokenizer extends LocationParser {
|
||||
return;
|
||||
}
|
||||
|
||||
if (curContext.override) {
|
||||
curContext.override(this);
|
||||
const override = curContext?.override;
|
||||
if (override) {
|
||||
override(this);
|
||||
} else {
|
||||
this.getTokenFromCode(this.input.codePointAt(this.state.pos));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user