LibJS: Value.in uses has_property instead of get().is_empty()

This commit is contained in:
Matthew Olsson 2020-06-03 14:27:01 -07:00 committed by Andreas Kling
commit 58a72e9b81
Notes: sideshowbarker 2024-07-19 05:47:36 +09:00

View file

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