mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 08:48:57 +00:00
LibWeb/FileAPI: Remove redundant if condition
We have already verified above that options->type is not empty.
This commit is contained in:
parent
a021134457
commit
dd83634121
Notes:
github-actions[bot]
2025-09-03 19:44:58 +00:00
Author: https://github.com/kennethmyhra
Commit: dd83634121
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6064
Reviewed-by: https://github.com/gmta ✅
1 changed files with 3 additions and 6 deletions
|
@ -212,12 +212,9 @@ GC::Ref<Blob> Blob::create(JS::Realm& realm, Optional<BlobPartsOrByteBuffer> con
|
|||
// FIXME: 2. Convert every character in t to ASCII lowercase.
|
||||
|
||||
// NOTE: The spec is out of date, and we are supposed to call into the MimeType parser here.
|
||||
if (!options->type.is_empty()) {
|
||||
auto maybe_parsed_type = Web::MimeSniff::MimeType::parse(options->type);
|
||||
|
||||
if (maybe_parsed_type.has_value())
|
||||
type = maybe_parsed_type->serialized();
|
||||
}
|
||||
auto maybe_parsed_type = MimeSniff::MimeType::parse(options->type);
|
||||
if (maybe_parsed_type.has_value())
|
||||
type = maybe_parsed_type->serialized();
|
||||
}
|
||||
|
||||
// 4. Return a Blob object referring to bytes as its associated byte sequence, with its size set to the length of bytes, and its type set to the value of t from the substeps above.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue