Skip to content

Commit

Permalink
fix returning a valid interface when underlying implementation is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
dhontecillas committed Apr 24, 2024
1 parent 5f928c7 commit a918d4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions state/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ func GlobalState() OTEL {
otelStateMutex.RLock()
s := otelState
otelStateMutex.RUnlock()
if s == nil {
return nil
}
return s
}

Expand Down

0 comments on commit a918d4f

Please sign in to comment.