From 86642add2facc03297abbdb857e0a127cc51295f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 20 Mar 2020 20:49:48 +0100 Subject: [PATCH] LibJS: Allow default-constructing a JS::Value (undefined) --- Libraries/LibJS/Runtime/Value.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Libraries/LibJS/Runtime/Value.h b/Libraries/LibJS/Runtime/Value.h index ada26761c6..f54135ab8a 100644 --- a/Libraries/LibJS/Runtime/Value.h +++ b/Libraries/LibJS/Runtime/Value.h @@ -52,6 +52,11 @@ public: bool is_boolean() const { return m_type == Type::Boolean; } bool is_cell() const { return is_string() || is_object(); } + Value() + : m_type(Type::Undefined) + { + } + explicit Value(bool value) : m_type(Type::Boolean) {