Skip to content

Commit

Permalink
fix: runtime error: invalid memory address or nil pointer dereference (
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurFritz committed May 4, 2023
1 parent 91f47ff commit d14eaa9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/yqlib/decoder_json.go
Expand Up @@ -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:
Expand Down

0 comments on commit d14eaa9

Please sign in to comment.