Skip to content

Commit

Permalink
fix issue when summary not available
Browse files Browse the repository at this point in the history
  • Loading branch information
emilie19 committed Nov 24, 2023
1 parent 0b648d7 commit f3d2184
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/OccurrencesElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,23 @@ import shared_fields from '@/components/shared_fields.js'
}
},
done_yes_count(){
if (this.occurrence.occurrenceRelationSummary.DONE_YES){
if ('occurrenceRelationSummary' in this.occurrence && this.occurrence.occurrenceRelationSummary.DONE_YES){
return [...Array(this.occurrence.occurrenceRelationSummary.DONE_YES).keys()].slice(0,20)
}
else {
return []
}
},
done_no_count(){
if (this.occurrence.occurrenceRelationSummary.DONE_NO){
if ('occurrenceRelationSummary' in this.occurrence && this.occurrence.occurrenceRelationSummary.DONE_NO){
return [...Array(this.occurrence.occurrenceRelationSummary.DONE_NO).keys()].slice(0,20)
}
else {
return []
}
},
udcb_count(){
if (this.occurrence.occurrenceRelationSummary.UDCB){
if ('occurrenceRelationSummary' in this.occurrence && this.occurrence.occurrenceRelationSummary.UDCB){
return [...Array(this.occurrence.occurrenceRelationSummary.UDCB).keys()].slice(0,20)
}
else {
Expand All @@ -87,7 +87,7 @@ import shared_fields from '@/components/shared_fields.js'
},
pending_count(){
if (this.occurrence.occurrenceRelationSummary.PNDG){
if ('occurrenceRelationSummary' in this.occurrence && this.occurrence.occurrenceRelationSummary.PNDG){
return [...Array(this.occurrence.occurrenceRelationSummary.PNDG).keys()].slice(0,20)
}
else {
Expand Down

0 comments on commit f3d2184

Please sign in to comment.