Skip to content

Commit

Permalink
fix answer colon
Browse files Browse the repository at this point in the history
  • Loading branch information
patricijab committed Nov 15, 2023
1 parent 311d072 commit 3f28d48
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
17 changes: 13 additions & 4 deletions parlacards/cards/_components/Answer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,20 @@ export default {
},
computed: {
authors() {
if (this.event.answer.person_authors || this.event.answer.organization_authors) {
const authors = this.event.answer.person_authors.concat(this.event.answer.organization_authors);
return authors.map((a) => a.name).join(", ") + ":";
let authors = "";
if (this.event.answer.person_authors) {
authors = this.event.answer.person_authors.map((a) => a.name).join(", ");
}
if (this.event.answer.organization_authors) {
const organization_authors = this.event.answer.organization_authors.map((a) => a.name).join(", ");
authors = authors.concat(organization_authors);
}
if (authors) {
authors = authors.concat(":");
return authors;
} else {
return "";
}
return "";
}
},
};
Expand Down
1 change: 0 additions & 1 deletion parlacards/cards/person/public-answers/card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<question-list
:question-days="questionDays"
:is-loading="card.isLoading"
list-type="questions"
@load-more="loadMore"
/>
</card-wrapper>
Expand Down

0 comments on commit 3f28d48

Please sign in to comment.