Skip to content

Commit d21449c

Browse files
committed
fix: dont convert nil interface
1 parent d137c60 commit d21449c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

internal/util/syncmap.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ type SyncMap[K comparable, V any] struct {
88

99
func (m *SyncMap[K, V]) Load(key K) (value V, ok bool) {
1010
v, ok := m.m.Load(key)
11+
if !ok {
12+
return
13+
}
1114
return v.(V), ok
1215
}
1316

0 commit comments

Comments
 (0)