From 58a72e9b810036ebdd91331137ce50e55dbe1ff4 Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Wed, 3 Jun 2020 14:27:01 -0700 Subject: [PATCH] LibJS: Value.in uses has_property instead of get().is_empty() --- Libraries/LibJS/Runtime/Value.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibJS/Runtime/Value.cpp b/Libraries/LibJS/Runtime/Value.cpp index b2eab819e2..e823cb5409 100644 --- a/Libraries/LibJS/Runtime/Value.cpp +++ b/Libraries/LibJS/Runtime/Value.cpp @@ -539,7 +539,7 @@ Value in(Interpreter& interpreter, Value lhs, Value rhs) auto lhs_string = lhs.to_string(interpreter); if (interpreter.exception()) return {}; - return Value(!rhs.as_object().get(lhs_string).is_empty()); + return Value(rhs.as_object().has_property(lhs_string)); } Value instance_of(Interpreter&, Value lhs, Value rhs)