mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
LibWeb: Actually return an empty value when an exception is thrown via
throw_dom_exception_if_needed() Fixes #6298.
This commit is contained in:
parent
9c201767a0
commit
d2b5c4d8dc
1 changed files with 2 additions and 2 deletions
|
@ -104,8 +104,8 @@ template<typename T>
|
|||
bool should_return_empty(const Optional<T>& value)
|
||||
{
|
||||
if constexpr (IsSame<JS::Value, T>)
|
||||
return value.has_value() && value.value().is_empty();
|
||||
return false;
|
||||
return !value.has_value() || value.value().is_empty();
|
||||
return !value.has_value();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue