Skip to content

Commit 4764e2e

Browse files
committed
object literal name fixed
1 parent 462eb46 commit 4764e2e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

YantraJS.Core/FastParser/Parser/FastParser.ObjectLiteral.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ bool ObjectProperty(
120120
if (!Statement(out var body))
121121
throw stream.Unexpected();
122122

123-
var fx = new AstFunctionExpression(current, PreviousToken, false, isAsync, isGenerator, null, parameters, body);
123+
var fx = new AstFunctionExpression(current, PreviousToken, false, isAsync, isGenerator,
124+
key is AstIdentifier id ? id : null, parameters, body);
124125

125126
property = new AstClassProperty(
126127
current,

0 commit comments

Comments
 (0)