diff options
author | Christian Kandeler <[email protected]> | 2025-05-26 18:34:58 +0200 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2025-05-27 08:02:22 +0000 |
commit | 2395ba594e33ea64ac4224048bd71d5c64457511 (patch) | |
tree | 42b958c185f4b73be6c85ec00d95f8b1dc073362 | |
parent | e54b544adc2af960a59e2c98082c5ab818a684ad (diff) |
Evaluator: Do not return JS_UNINITIALIZED to quickjs
Such values can end up being visible to users and behave strangely there
(e.g. they are not falsy).
Amends 31aac517ef90b04b07cb532ce7eb9f6669e6514e.
Change-Id: Ied14b3a2bd5789d043c21aacf765967cfa89c60d
Reviewed-by: Ivan Komissarov <[email protected]>
-rw-r--r-- | src/lib/corelib/language/evaluator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/corelib/language/evaluator.cpp b/src/lib/corelib/language/evaluator.cpp index 8cc0f8f72..2b0faf2de 100644 --- a/src/lib/corelib/language/evaluator.cpp +++ b/src/lib/corelib/language/evaluator.cpp @@ -587,7 +587,7 @@ public: { JSValue result = m_value.apply(this); if (m_engine.checkForJsError(m_value.location())) - return JS_UNINITIALIZED; + return JS_UNDEFINED; if (JS_IsUninitialized(result)) result = JS_UNDEFINED; convertToPropertyType(&m_engine, &m_item, m_decl, &m_value, ConversionType::Full, result); |