Skip to content

Commit

Permalink
platform api: list update when non-nil
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Vallejo <jakeev@amazon.com>
  • Loading branch information
jahkeup committed Aug 20, 2020
1 parent 2a5c4a4 commit b83a84a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/platform/api/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ type listAvailableResponse struct {
}

func (lar *listAvailableResponse) Updates() []platform.Update {
return []platform.Update{lar.chosenUpdate}
if lar.chosenUpdate != nil {
return []platform.Update{lar.chosenUpdate}
}

return []platform.Update{}
}

func (p apiPlatform) ListAvailable() (platform.Available, error) {
Expand Down

0 comments on commit b83a84a

Please sign in to comment.