Skip to content

Commit

Permalink
chore: add test for element
Browse files Browse the repository at this point in the history
  • Loading branch information
anfibiacreativa committed Nov 6, 2023
1 parent 2b28ead commit 36a95af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/chat-component/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ export class ChatComponent extends LitElement {
let timeout: any = 0;
clearTimeout(timeout);
timeout = setTimeout(() => {
this.chatFooter.scrollIntoView({ behavior: 'smooth', block: 'center' });
if (this.chatFooter) {
this.chatFooter.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
}, 500);
}
// Send the question to the Open AI API and render the answer in the chat
Expand Down

0 comments on commit 36a95af

Please sign in to comment.