mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-17 16:28:06 +03: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
Notes:
sideshowbarker
2024-07-17 00:54:56 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/792258afe8 Pull-request: https://github.com/SerenityOS/serenity/pull/17274 Reviewed-by: https://github.com/linusg
@ -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 New Issue
Block a user