Skip to content

Commit

Permalink
fix race condition (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp authored Aug 18, 2024
1 parent 26f9b11 commit 5393174
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/seven-buttons-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro-vtbot': patch
---

LoadingIndicator: Increases robustness of indicator creation.
2 changes: 1 addition & 1 deletion components/loading-indicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ export async function vtbotLoadingIndicator(options: Options) {

div.id = 'vtbot-loading-indicator';
div.appendChild(img!);
document.body.appendChild(div);
document.getElementById('vtbot-loading-indicator') || document.body.appendChild(div);
}

0 comments on commit 5393174

Please sign in to comment.