Skip to content

Commit

Permalink
Handling empty ViewState.Values deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Oxtoby committed Apr 3, 2021
1 parent 66f4543 commit 7d54f33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SlackNet/Objects/ViewInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using SlackNet.Blocks;

namespace SlackNet
Expand Down Expand Up @@ -29,6 +30,7 @@ public class ViewState
/// of the child <see cref="IInputBlockElement"/> of the input block.
/// This final child object will contain the type and submitted value of the input block element.
/// </summary>
[JsonConverter(typeof(IgnoreArrayConverter))] // Slack returns an empty array instead of an object if no values have been filled in
public Dictionary<string, Dictionary<string, ElementValue>> Values { get; set; } = new();

/// <summary>
Expand Down

0 comments on commit 7d54f33

Please sign in to comment.