1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

GO-3921: fix value check

Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
This commit is contained in:
AnastasiaShemyakinskaya 2024-08-23 12:12:37 +02:00
parent 9ca41da8b6
commit e4400aadae
No known key found for this signature in database
GPG key ID: CCD60ED83B103281

View file

@ -168,7 +168,7 @@ func (c *oCache) load(ctx context.Context, id string, e *entry) {
c.mu.Lock() c.mu.Lock()
defer c.mu.Unlock() defer c.mu.Unlock()
if value == nil { if value == nil && err == nil {
err = fmt.Errorf("loaded value is nil, id: %s", id) err = fmt.Errorf("loaded value is nil, id: %s", id)
} }
if err != nil { if err != nil {