Skip to content

Commit 837a76b

Browse files
committed
check that status.sourceRef is set
1 parent f9666a4 commit 837a76b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

api/v1alpha1/types.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ func (r *SourceReference) Load(ctx context.Context, clnt client.Client, componen
8383
spec := &component.Spec
8484
status := &component.Status
8585

86-
if spec.Sticky && isComponentProcessing(component) {
87-
// note: status.SourceRef is not nil if at least one reconcile iteration was completed,
88-
// and this is given if IsProcessing() returns true
86+
if spec.Sticky && isComponentProcessing(component) && status.SourceRef != nil {
8987
r.artifact = status.SourceRef.Artifact
9088
r.digest = status.SourceRef.Digest
9189
r.loaded = true

0 commit comments

Comments
 (0)