mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Ignore null value in deserialization to avoid unexpected nullreference issue
This commit is contained in:
parent
908d1c4124
commit
c7cfd25817
1 changed files with 3 additions and 0 deletions
|
|
@ -50,6 +50,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
private static readonly JsonSerializerOptions options = new()
|
||||
{
|
||||
PropertyNameCaseInsensitive = true,
|
||||
IgnoreNullValues = true,
|
||||
Converters =
|
||||
{
|
||||
new JsonObjectConverter()
|
||||
|
|
@ -63,6 +64,8 @@ namespace Flow.Launcher.Core.Plugin
|
|||
var queryResponseModel = await
|
||||
JsonSerializer.DeserializeAsync<JsonRPCQueryResponseModel>(output, options);
|
||||
|
||||
await output.DisposeAsync();
|
||||
|
||||
return ParseResults(queryResponseModel);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue