mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
LibJS: Add Value::is_nullish()
This commit is contained in:
parent
ef1b21004f
commit
fa18baf3e8
9 changed files with 22 additions and 21 deletions
|
@ -851,7 +851,7 @@ bool abstract_eq(GlobalObject& global_object, Value lhs, Value rhs)
|
|||
if (lhs.type() == rhs.type())
|
||||
return strict_eq(lhs, rhs);
|
||||
|
||||
if ((lhs.is_undefined() || lhs.is_null()) && (rhs.is_undefined() || rhs.is_null()))
|
||||
if (lhs.is_nullish() && rhs.is_nullish())
|
||||
return true;
|
||||
|
||||
if (lhs.is_number() && rhs.is_string())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue