We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 97fa74f + 6669135 commit 0819bcaCopy full SHA for 0819bca
trie/dtrie/dtrie.go
@@ -80,7 +80,11 @@ func (d *Dtrie) Size() (size int) {
80
// Get returns the value for the associated key or returns nil if the
81
// key does not exist.
82
func (d *Dtrie) Get(key interface{}) interface{} {
83
- return get(d.root, d.hasher(key), key).Value()
+ node := get(d.root, d.hasher(key), key)
84
+ if node != nil {
85
+ return node.Value()
86
+ }
87
+ return nil
88
}
89
90
// Insert adds a key value pair to the Dtrie, replacing the existing value if
0 commit comments