mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-06 12:38:40 +00:00
Enforce non-nullability in more cases during JSON parse (#367)
This commit is contained in:
@@ -48,7 +48,14 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
return jsonNode.AsArray () |> Seq.map (fun elt -> Gym.jsonParse elt) |> List.ofSeq
|
||||
return
|
||||
jsonNode.AsArray ()
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> Gym.jsonParse elt)
|
||||
)
|
||||
|> List.ofSeq
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
|
||||
|
Reference in New Issue
Block a user