mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibWeb: Add missing body has_value() check in XMLHttpRequest::send()
This commit is contained in:
parent
1c979889b2
commit
0ea4d228e6
1 changed files with 1 additions and 1 deletions
|
@ -462,7 +462,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<Variant<JS::Handle<DOM::
|
|||
if (!m_request_headers.contains("Content-Type"sv)) {
|
||||
if (body_with_type.has_value() && body_with_type->type.has_value()) {
|
||||
request.set_header("Content-Type", String { body_with_type->type->span() });
|
||||
} else if (body->has<JS::Handle<DOM::Document>>()) {
|
||||
} else if (body.has_value() && body->has<JS::Handle<DOM::Document>>()) {
|
||||
request.set_header("Content-Type", "text/html;charset=UTF-8");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue