Start ObjectTypeProperty's optional property as false in each loop
This commit is contained in:
parent
fe86c0a4e9
commit
c44858207e
@ -256,7 +256,6 @@ pp.flowParseObjectTypeCallProperty = function (node, isStatic) {
|
||||
pp.flowParseObjectType = function (allowStatic) {
|
||||
var nodeStart = this.startNode();
|
||||
var node;
|
||||
var optional = false;
|
||||
var propertyKey;
|
||||
var isStatic;
|
||||
|
||||
@ -267,6 +266,7 @@ pp.flowParseObjectType = function (allowStatic) {
|
||||
this.expect(tt.braceL);
|
||||
|
||||
while (!this.match(tt.braceR)) {
|
||||
var optional = false;
|
||||
var startPos = this.state.start, startLoc = this.state.startLoc;
|
||||
node = this.startNode();
|
||||
if (allowStatic && this.isContextual("static")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user