Skip to content

Commit

Permalink
AnnotationPopover: Add loading to confirm method (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Nov 5, 2019
1 parent 35f73dc commit e3c0005
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/AnnotationPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,13 @@ export default {
annotation.creator.name = this.creatorName
}
}
annotation = await provider.addAnnotation(annotation)
this.loading = true
try {
annotation = await provider.addAnnotation(annotation)
} catch (error) {
annotation = null
}
this.loading = false
// Check if URI stayed the same
const newUri = _.get(this.imapping, "uri")
if (uri != newUri || !annotation) {
Expand Down

0 comments on commit e3c0005

Please sign in to comment.