Skip to content

Commit 8706f59

Browse files
committed
Fix nil pointer
1 parent 289a3da commit 8706f59

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/flypg/state/store.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ func (c *Store) PullUserConfig(key string) ([]byte, error) {
4646
if err != nil {
4747
return nil, err
4848
}
49+
50+
if pair == nil {
51+
return nil, nil
52+
}
53+
4954
return pair.Value, nil
5055
}
5156

0 commit comments

Comments
 (0)