Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
fix: waiting time is ms
Browse files Browse the repository at this point in the history
  • Loading branch information
jehon committed Oct 19, 2022
1 parent 0b7c9b9 commit e0b69e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jehon-image-loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class JehonImageLoading extends HTMLElement {
el.removeAttribute('loading');

// Wait for animation to end
await sleep(Math.max(JehonImageLoading.#transitionTimeMs, 0.001));
await sleep(Math.max(JehonImageLoading.#transitionTimeMs, 1));

this.shadowRoot.querySelectorAll('img:not([loading]):not(:last-of-type)')
.forEach(img => img.remove());
Expand Down

0 comments on commit e0b69e0

Please sign in to comment.