Skip to content

Commit

Permalink
chore: only createSpinner if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcru committed Jan 4, 2024
1 parent e56463e commit e8a33c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/HolyProgress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ export class HolyProgress {
* @returns {void}
*/
private readonly createSpinner = (): void => {
/** only createSpinner if it doesn't exist */
if (document.getElementById('holy-progress-spinner') !== null) {
return;
}

const spinner = document.createElement('div');
spinner.id = 'holy-progress-spinner';
spinner.style.pointerEvents = 'none';
Expand Down

0 comments on commit e8a33c2

Please sign in to comment.