mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00: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:
parent
57f7e6e775
commit
9555ca99a0
19 changed files with 56 additions and 56 deletions
|
@ -38,7 +38,7 @@ void Error::install_error_cause(Value options)
|
|||
auto& options_object = options.as_object();
|
||||
if (!options_object.has_property(vm.names.cause))
|
||||
return;
|
||||
auto cause = options_object.get(vm.names.cause).value_or(js_undefined());
|
||||
auto cause = options_object.get(vm.names.cause);
|
||||
if (vm.exception())
|
||||
return;
|
||||
define_property(vm.names.cause, cause, Attribute::Writable | Attribute::Configurable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue