The plugin currently allows saving annotations without selecting a target region on the Canvas. This would be fine (I think), but the annotation can not be edited because an error occurs in the AnnotationCreation constructor.props.annotation.target.selector` is undefined in the following line:
Alternatively, saving an annotation without a selector should not be allowed. But if an annotation store provides annotations from a different source than Mirador, the error might still occur.
The plugin currently allows saving annotations without selecting a target region on the Canvas. This would be fine (I think), but the annotation can not be edited because an error occurs in the
AnnotationCreation constructor.
props.annotation.target.selector` is undefined in the following line:https://github.com/ProjectMirador/mirador-annotations/blob/d6b55e038c80344fb0a3626d8a5b51475a645e29/src/AnnotationCreation.js#L62
I'd suggest to just put a check for
props.annotation.target.selector
around this block: https://github.com/ProjectMirador/mirador-annotations/blob/d6b55e038c80344fb0a3626d8a5b51475a645e29/src/AnnotationCreation.js#L53-L63Alternatively, saving an annotation without a selector should not be allowed. But if an annotation store provides annotations from a different source than Mirador, the error might still occur.