mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-23 11:04:40 +00:00
LibWeb: Restore handling of the serenity:ladybird/headless capability
This was refactored a bit incorrectly in d8fde14
.
This commit is contained in:
parent
9347db6f91
commit
792258afe8
|
@ -52,7 +52,7 @@ static Response deserialize_as_ladybird_options(JsonValue value)
|
|||
|
||||
auto const& object = value.as_object();
|
||||
|
||||
if (auto headless = object.get_bool("headless"sv); headless.has_value())
|
||||
if (auto headless = object.get("headless"sv); headless.has_value() && !headless->is_bool())
|
||||
return Error::from_code(ErrorCode::InvalidArgument, "Extension capability serenity:ladybird/headless must be a boolean"sv);
|
||||
|
||||
return value;
|
||||
|
|
Loading…
Reference in a new issue