fix: runtime error: invalid memory address or nil pointer dereference (#1649)

This commit is contained in:
Arthur Fritz Santiago 2023-05-04 01:43:48 -03:00 committed by GitHub
parent 91f47ff307
commit d14eaa9b49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,9 @@ func (dec *jsonDecoder) Decode() (*CandidateNode, error) {
}
func (dec *jsonDecoder) convertToYamlNode(data *orderedMap) (*yaml.Node, error) {
if data == nil {
return createScalarNode(nil, "null"), nil
}
if data.kv == nil {
switch rawData := data.altVal.(type) {
case nil: