diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp b/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp index f9a24a35b6..e0b8cab60c 100644 --- a/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp @@ -42,9 +42,7 @@ Value AggregateErrorConstructor::construct(FunctionObject& new_target) auto& vm = this->vm(); auto& global_object = this->global_object(); - auto* aggregate_error = ordinary_create_from_constructor<AggregateError>(global_object, new_target, &GlobalObject::aggregate_error_prototype); - if (vm.exception()) - return {}; + auto* aggregate_error = TRY_OR_DISCARD(ordinary_create_from_constructor<AggregateError>(global_object, new_target, &GlobalObject::aggregate_error_prototype)); if (!vm.argument(1).is_undefined()) { auto message = vm.argument(1).to_string(global_object); |