Skip to content

Commit bc6dbe9

Browse files
committed
fix: empty follow up question rendering
1 parent fd0a158 commit bc6dbe9

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

packages/chat-component/src/components/chat-thread-component.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -177,19 +177,21 @@ export class ChatThreadComponent extends LitElement {
177177
<div class="items__listWrapper">
178178
${unsafeSVG(iconQuestion)}
179179
<ul class="items__list followup">
180-
${followupQuestions.map(
181-
(followupQuestion) => html`
182-
<li class="items__listItem--followup">
183-
<a
184-
class="items__link"
185-
href="#"
186-
data-testid="followUpQuestion"
187-
@click="${(event) => this.handleFollowupQuestionClick(followupQuestion, entry, event)}"
188-
>${followupQuestion}</a
189-
>
190-
</li>
191-
`,
192-
)}
180+
${followupQuestions
181+
.filter((q) => q !== null)
182+
.map(
183+
(followupQuestion) => html`
184+
<li class="items__listItem--followup">
185+
<a
186+
class="items__link"
187+
href="#"
188+
data-testid="followUpQuestion"
189+
@click="${(event) => this.handleFollowupQuestionClick(followupQuestion, entry, event)}"
190+
>${followupQuestion}</a
191+
>
192+
</li>
193+
`,
194+
)}
193195
</ul>
194196
</div>
195197
`;

0 commit comments

Comments
 (0)