LibJS: Allow default-constructing a JS::Value (undefined)

This commit is contained in:
Andreas Kling 2020-03-20 20:49:48 +01:00
parent a82f64d3d6
commit 86642add2f
Notes: sideshowbarker 2024-07-19 08:12:44 +09:00

View file

@ -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)
{