Explorar el Código

fix null image artifacts return (#3964)

Feroze Mohideen hace 2 años
padre
commit
9a1c046a2f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      api/server/handlers/project/images.go

+ 1 - 1
api/server/handlers/project/images.go

@@ -90,7 +90,7 @@ func (p *ImagesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 	}
 
 	for _, image := range ccpResp.Msg.Images {
-		var artifacts []ImageArtifact
+		artifacts := make([]ImageArtifact, 0)
 		for _, artifact := range image.Artifacts {
 			artifacts = append(artifacts, ImageArtifact{
 				Tag:       artifact.Tag,