Commit 8427dc83 authored by pestov's avatar pestov
Browse files

fix: check if image key is present at API response

parent fbd62e92
Pipeline #230325 passed with stages
in 4 minutes and 6 seconds
...@@ -267,12 +267,12 @@ export default { ...@@ -267,12 +267,12 @@ export default {
this.$root.$emit('manifest-changed'); this.$root.$emit('manifest-changed');
} }
this.imageurl = data.image.id || '';
if (data.annotationCollection) { if (data.annotationCollection) {
this.getAnnotations(data.annotationCollection); this.getAnnotations(data.annotationCollection);
} }
if (data.image) {
this.imageurl = data.image.id || '';
fetch(this.imageurl).then((response) => { fetch(this.imageurl).then((response) => {
if (response.status === 200 || response.status === 201) { if (response.status === 200 || response.status === 201) {
this.errormessage = false; this.errormessage = false;
...@@ -284,6 +284,7 @@ export default { ...@@ -284,6 +284,7 @@ export default {
// for CORS error. // for CORS error.
this.errormessage = true; this.errormessage = true;
}); });
}
}); });
}, },
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment