mirror of
https://github.com/RGBCube/serenity
synced 2025-06-30 05:32:07 +00:00
LibWeb: Convert HTMLOptionsCollection to use TRY for error propagation
This commit is contained in:
parent
2d34216628
commit
f9cc5d1071
1 changed files with 1 additions and 2 deletions
|
@ -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 {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue