Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby-plugin-image): Fix onload race condition #29064

Merged
merged 1 commit into from
Jan 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/gatsby-plugin-image/src/gatsby-ssr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export function onRenderBody({ setHeadComponents }: RenderBodyArgs): void {

// if a main image does not have a ssr tag, we know it's not the first run anymore
if (typeof e.target.dataset["gatsbyImageSsr"] === 'undefined') {
document.body.removeEventListener('load', gatsbyImageNativeLoader, true);
return;
}

Expand Down