Skip to content

Commit

Permalink
fix: empty follow up question rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
shibbas committed Nov 30, 2023
1 parent 9a7e29b commit 24a0093
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions packages/chat-component/src/components/chat-thread-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,21 @@ export class ChatThreadComponent extends LitElement {
<div class="items__listWrapper">
${unsafeSVG(iconQuestion)}
<ul class="items__list followup">
${followupQuestions.map(
(followupQuestion) => html`
<li class="items__listItem--followup">
<a
class="items__link"
href="#"
data-testid="followUpQuestion"
@click="${(event) => this.handleFollowupQuestionClick(followupQuestion, entry, event)}"
>${followupQuestion}</a
>
</li>
`,
)}
${followupQuestions
.filter((q) => q !== null)
.map(
(followupQuestion) => html`
<li class="items__listItem--followup">
<a
class="items__link"
href="#"
data-testid="followUpQuestion"
@click="${(event) => this.handleFollowupQuestionClick(followupQuestion, entry, event)}"
>${followupQuestion}</a
>
</li>
`,
)}
</ul>
</div>
`;
Expand Down

0 comments on commit 24a0093

Please sign in to comment.