Skip to content

Commit c45b138

Browse files
rishipalcopybara-github
authored andcommitted
Fix build time note: [RhinoNodeDetachFirstChild] Simplification
Changes: fullChainStart.getFirstChild().detach(); to: fullChainStart.removeFirstChild(); PiperOrigin-RevId: 325807540
1 parent cd6ffce commit c45b138

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/google/javascript/jscomp/OptionalChainRewriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ private Node rewriteInitialSegment(final Node fullChainStart, final Node fullCha
204204
final Node thisValue = receiverNode.getFirstChild();
205205
final Node tmpThisNode = getSubExprNameNode(thisValue);
206206
final Node tmpReceiverNode = getSubExprNameNode(receiverNode);
207-
receiverNode = fullChainStart.getFirstChild().detach();
207+
receiverNode = fullChainStart.removeFirstChild();
208208
fullChainStart.addChildToFront(tmpThisNode);
209209
fullChainStart.addChildToFront(
210210
astFactory

0 commit comments

Comments
 (0)