Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Commit

Permalink
fix(admin): proposal list works with null externalId
Browse files Browse the repository at this point in the history
  • Loading branch information
vhf committed Oct 28, 2019
1 parent da1882d commit 5d85593
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion components/admin/AdminProposalList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
{{ proposal.headline }}
</nuxt-link>
<a
v-for="externalLink in proposal.externalId.split(' ')"
v-for="externalLink in externalLinksFor(proposal)"
:key="externalLink"
:href="externalLink"
class="is-link"
Expand Down Expand Up @@ -328,6 +328,13 @@ export default {
this.statusFilter = status
this.statusDropdown = false
this.$emit('status-filter', status)
},
externalLinksFor (proposal) {
// externalId can be `null`
if (proposal.externalId) {
return proposal.externalId.split(' ')
}
return []
}
}
}
Expand Down

0 comments on commit 5d85593

Please sign in to comment.