mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Remove unnecessary value_or() from get()
Object::get() never returns an empty value anymore, as per the spec, so having a value_or() fallback is no longer needed.
This commit is contained in:
committed by
Andreas Kling
parent
57f7e6e775
commit
9555ca99a0
Notes:
sideshowbarker
2024-07-18 10:25:40 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/9555ca99a03 Pull-request: https://github.com/SerenityOS/serenity/pull/8442 Reviewed-by: https://github.com/IdanHo ✅
@@ -1216,7 +1216,7 @@ Value Object::ordinary_to_primitive(Value::PreferredType preferred_type) const
|
||||
Value Object::invoke_internal(const StringOrSymbol& property_name, Optional<MarkedValueList> arguments)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
auto property = get(property_name).value_or(js_undefined());
|
||||
auto property = get(property_name);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
if (!property.is_function()) {
|
||||
|
||||
Reference in New Issue
Block a user