Skip to content

Commit 5558165

Browse files
estrozgrantr
andauthored
Check for nil Raw value
Co-Authored-By: grantr <[email protected]>
1 parent bf4afaa commit 5558165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/client/fake/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (c *fakeClient) List(ctx context.Context, opts *client.ListOptions, list ru
9393
if err != nil {
9494
// The old fake client required GVK info in Raw.TypeMeta, so check there
9595
// before giving up
96-
if opts.Raw.TypeMeta.APIVersion == "" || opts.Raw.TypeMeta.Kind == "" {
96+
if opts.Raw == nil || opts.Raw.TypeMeta.APIVersion == "" || opts.Raw.TypeMeta.Kind == "" {
9797
return err
9898
}
9999
gvk = opts.Raw.TypeMeta.GroupVersionKind()

0 commit comments

Comments
 (0)