http: nitpick
This commit is contained in:
parent
1f3a62a7a8
commit
8cd6f8eb17
1 changed files with 1 additions and 4 deletions
|
@ -90,10 +90,7 @@ class MIMETypeConverter : JsonConverter<MIMEType>
|
|||
|
||||
public override MIMEType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
string? str = reader.GetString();
|
||||
if (str == null)
|
||||
throw new JsonException("Cannot read MIME type");
|
||||
|
||||
string? str = reader.GetString() ?? throw new JsonException("Cannot read MIME type");
|
||||
return new MIMEType(str);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue