Skip to content
Snippets Groups Projects
Unverified Commit 9e750d39 authored by Robert Casties's avatar Robert Casties Committed by GitHub
Browse files

Add target.source (without id) as valid target.

According to the WebAnno spec it is valid for `target.source` to be a uri.

Closes https://github.com/ProjectMirador/mirador-annotations/issues/25
parent 982cd2c0
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ export default class AnnotationItem { ...@@ -29,7 +29,7 @@ export default class AnnotationItem {
case 'string': case 'string':
return target.replace(/#?xywh=(.*)$/, ''); return target.replace(/#?xywh=(.*)$/, '');
case 'object': case 'object':
return target.id || (target.source && target.source.id); return (target.source && target.source.id) || target.source || target.id;
default: default:
return null; return null;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment