summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Value.cpp')
-rw-r--r--Libraries/LibJS/Value.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/Value.cpp b/Libraries/LibJS/Value.cpp
index 30ce077737..c29b95943b 100644
--- a/Libraries/LibJS/Value.cpp
+++ b/Libraries/LibJS/Value.cpp
@@ -59,7 +59,7 @@ bool Value::to_boolean() const
case Type::Boolean:
return m_value.as_bool;
case Type::Number:
- return m_value.as_double == 0 || m_value.as_double == -0;
+ return !(m_value.as_double == 0 || m_value.as_double == -0);
case Type::Null:
case Type::Undefined:
return false;