Skip to content

Commit

Permalink
Merge pull request #1 from fanap-infra/fix/get-key-checking
Browse files Browse the repository at this point in the history
check node is nil in get key
  • Loading branch information
mohammadVatandoost authored Aug 10, 2021
2 parents bfdbe2d + c4016ef commit cc97077
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions get.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ func GetByteSize(path string) *big.Int {

func GetKeys(path string) []string {
nodes := conf.GetNode(path)
if nodes == nil {
return []string{}
}
if nodes.IsObject() {
return nodes.GetObject().GetKeys()
}
Expand Down

0 comments on commit cc97077

Please sign in to comment.