Skip to content

Commit e8a33c2

Browse files
committed
chore: only createSpinner if it doesn't exist
1 parent e56463e commit e8a33c2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/HolyProgress.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,11 @@ export class HolyProgress {
336336
* @returns {void}
337337
*/
338338
private readonly createSpinner = (): void => {
339+
/** only createSpinner if it doesn't exist */
340+
if (document.getElementById('holy-progress-spinner') !== null) {
341+
return;
342+
}
343+
339344
const spinner = document.createElement('div');
340345
spinner.id = 'holy-progress-spinner';
341346
spinner.style.pointerEvents = 'none';

0 commit comments

Comments
 (0)