mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2026-05-23 04:42:47 +00:00
fix(taglist): bug when listing multi-arch images (#260)
Support when registry server does not respect the [Manifest Specification](https://docs.docker.com/registry/spec/manifest-v2-2/#image-manifest-field-descriptions). When the media type is `application/vnd.docker.distribution.manifest.list.v2+json` the response object must have a `layers` key, but sometimes you can have a `manifests` key... fixes #260
This commit is contained in:
@@ -109,7 +109,7 @@ export class DockerImage {
|
||||
return;
|
||||
}
|
||||
self.ociImage = response.mediaType === 'application/vnd.oci.image.index.v1+json';
|
||||
self.layers = self.ociImage ? response.manifests : response.layers;
|
||||
self.layers = response.layers || response.manifests;
|
||||
self.size = self.layers.reduce(function (acc, e) {
|
||||
return acc + e.size;
|
||||
}, 0);
|
||||
|
||||
Reference in New Issue
Block a user