aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/compiler/qv4compilerscanfunctions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp
index 68cb58da46..7506b238f8 100644
--- a/src/qml/compiler/qv4compilerscanfunctions.cpp
+++ b/src/qml/compiler/qv4compilerscanfunctions.cpp
@@ -554,7 +554,7 @@ void ScanFunctions::calcEscapingVariables()
for (Context *c : qAsConst(m->contextMap)) {
if (c->allVarsEscape && c->contextType == ContextType::Block && c->members.isEmpty())
c->allVarsEscape = false;
- if (!c->parent || m->debugMode)
+ if (c->contextType == ContextType::Global || (!c->isStrict && c->contextType == ContextType::Eval) || m->debugMode)
c->allVarsEscape = true;
if (c->allVarsEscape) {
if (c->parent) {