Commit 8949bf2a authored by Anton's avatar Anton

Always return body.source.id if existing

parent 107ea364
Pipeline #69265 passed with stage
in 2 minutes and 56 seconds
......@@ -56,7 +56,10 @@
methods: {
checkAnnotationType () {
if (this.selectedAnnotation !== null && this.selectedAnnotation !== undefined) {
return this.selectedAnnotation.body.type
if (this.selectedAnnotation.body.type && this.selectedAnnotation.body.type.indexOf('SpecificResource') > -1) {
return this.selectedAnnotation.body.source.type
}
else return this.selectedAnnotation.body.type
}
},
getAnnotationText (val) {
......@@ -67,14 +70,8 @@
case 'TextualBody':
this.annotationText = val.body.value
break
case 'Video':
this.annotationText = val.body.source.id
break
case 'VocabularyEntry':
this.annotationText = val.body.source.id
break
default:
this.annotationText = 'unknown'
this.annotationText = val.body.source.id || 'unknown'
break
}
}
......
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