Skip to content

Commit 0abf9c2

Browse files
Copy isUsed for robustness
1 parent d96b76b commit 0abf9c2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Runtime/ByteCode/ByteCodeEmitter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ static void EmitOptionalChainWrapper(ParseNodeUni *pnodeOptChain, ByteCodeGenera
6767
// `EmitNullPropagation` short-circuits to `skipLabel` in case of a nullish value
6868
emitChainContent(innerNode);
6969
pnodeOptChain->location = innerNode->location;
70+
pnodeOptChain->isUsed = innerNode->isUsed;
7071

7172
Js::ByteCodeLabel doneLabel = Js::Constants::NoRegister;
7273
if (pnodeOptChain->isUsed)

0 commit comments

Comments
 (0)