mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +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
Notes:
sideshowbarker
2024-07-18 20:24:25 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/d2b5c4d8dc4 Pull-request: https://github.com/SerenityOS/serenity/pull/6300 Issue: https://github.com/SerenityOS/serenity/issues/6298
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…
Reference in a new issue