diff options
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
| -rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 12639cba37..580406db86 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2001,7 +2001,7 @@ bool Codegen::visit(CallExpression *ast) int thisObject = bytecodeGenerator->newRegister(); int functionObject = bytecodeGenerator->newRegister(); - if (ast->isOptional) { + if (ast->isOptional || m_optionalChainsStates.top().actuallyHasOptionals) { base.loadInAccumulator(); bytecodeGenerator->addInstruction(Instruction::CmpEqNull()); auto jumpToUndefined = bytecodeGenerator->jumpTrue(); |
