Skip to content

Commit

Permalink
fix(gatsby-plugin-image): fix race condition (#35635)
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet authored May 12, 2022
1 parent 54bd223 commit 12cb033
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ if (hasNativeLazyLoadSupport) {
if (mainImage.complete) {
mainImage.style.opacity = 1;
// also hide the placeholder
mainImage.parentNode.parentNode.querySelector('[data-placeholder-image]').style.opacity = 0;
}
}
}
Expand Down

0 comments on commit 12cb033

Please sign in to comment.