mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
fix: runtime error: invalid memory address or nil pointer dereference (#1649)
This commit is contained in:
parent
91f47ff307
commit
d14eaa9b49
@ -46,6 +46,9 @@ func (dec *jsonDecoder) Decode() (*CandidateNode, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (dec *jsonDecoder) convertToYamlNode(data *orderedMap) (*yaml.Node, error) {
|
func (dec *jsonDecoder) convertToYamlNode(data *orderedMap) (*yaml.Node, error) {
|
||||||
|
if data == nil {
|
||||||
|
return createScalarNode(nil, "null"), nil
|
||||||
|
}
|
||||||
if data.kv == nil {
|
if data.kv == nil {
|
||||||
switch rawData := data.altVal.(type) {
|
switch rawData := data.altVal.(type) {
|
||||||
case nil:
|
case nil:
|
||||||
|
Loading…
Reference in New Issue
Block a user