Skip to content

Commit

Permalink
FIX: Use parser to create name node
Browse files Browse the repository at this point in the history
  • Loading branch information
0xe committed Jul 16, 2024
1 parent 8af362a commit 8ff5bff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rhino/src/main/java/org/mozilla/javascript/IRFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,13 @@ private Node transformFunction(FunctionNode fn) {
createIf(
createBinary(
Token.SHEQ,
new Name(fn.getPosition(), name),
new Name(fn.getPosition(), "undefined")),
parser.createName(name),
parser.createName("undefined")),
new Node(
Token.EXPR_VOID,
createAssignment(
Token.ASSIGN,
new Name(fn.getPosition(), name),
parser.createName(name),
transform(rhs)),
body.getLineno()),
null,
Expand Down

0 comments on commit 8ff5bff

Please sign in to comment.