mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 00:56:14 +00:00
LibWeb: Convert HTMLOptionsCollection to use TRY for error propagation
This commit is contained in:
committed by
Linus Groh
parent
2d34216628
commit
f9cc5d1071
@@ -50,8 +50,7 @@ DOM::ExceptionOr<void> HTMLOptionsCollection::add(HTMLOptionOrOptGroupElement el
|
||||
DOM::Node* parent = reference ? reference->parent() : root().ptr();
|
||||
|
||||
// 6. Pre-insert element into parent node before reference.
|
||||
if (auto result = parent->pre_insert(resolved_element, reference); result.is_exception())
|
||||
return result.exception();
|
||||
TRY(parent->pre_insert(resolved_element, reference));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user