Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Handle unset
union
map type (#650)
Without this check, an uninitialised (zero-value) `t.union` will get serialised as `null`, which then overrides the map's contents, leading to a panic: panic: assignment to entry in nil map By instead only unmarshalling this when we receive a non-nil version of the `t.union`, we can handle zero-value'd structs.
- Loading branch information
1 parent
e9d89b2
commit 91b48ba
Showing
3 changed files
with
34 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters