From 313057b6286dfb9be1ffa841e0f2a073cab20583 Mon Sep 17 00:00:00 2001 From: Ward Peeters Date: Thu, 12 May 2022 12:29:54 +0200 Subject: [PATCH 1/2] fix(gatsby-plugin-image): fix race condition (#35635) (cherry picked from commit 12cb033f7998427cfbabe8d833a7c2bd516f3b1f) --- packages/gatsby-plugin-image/src/components/layout-wrapper.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/gatsby-plugin-image/src/components/layout-wrapper.tsx b/packages/gatsby-plugin-image/src/components/layout-wrapper.tsx index b0155f95f6199..6643a03157154 100644 --- a/packages/gatsby-plugin-image/src/components/layout-wrapper.tsx +++ b/packages/gatsby-plugin-image/src/components/layout-wrapper.tsx @@ -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; } } } From 7167a5ccb99a83481400a3b50d2d9dbe4db3ac8d Mon Sep 17 00:00:00 2001 From: LekoArts Date: Thu, 12 May 2022 11:50:58 +0100 Subject: [PATCH 2/2] lock file --- yarn.lock | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/yarn.lock b/yarn.lock index a2009b19d7639..88e5e5354fb53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11846,7 +11846,7 @@ fs-extra@^1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" -fs-extra@^10.0.0, fs-extra@^10.1.0: +fs-extra@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== @@ -11925,27 +11925,6 @@ gather-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gather-stream/-/gather-stream-1.0.0.tgz#b33994af457a8115700d410f317733cbe7a0904b" -gatsby-core-utils@^3.8.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-3.8.2.tgz#9c2869f93a740d20536b1e92c8020efd85d43e5f" - integrity sha512-UwANr9yd8ayLinPDoRbU/rRgoOBOS715qe2LYCxq6hAtRabHWTEM8Vj0wh7LmyVGexx8MFgvp2NKikG2TZ5pzQ== - dependencies: - "@babel/runtime" "^7.15.4" - ci-info "2.0.0" - configstore "^5.0.1" - fastq "^1.13.0" - file-type "^16.5.3" - fs-extra "^10.0.0" - got "^11.8.3" - import-from "^4.0.0" - lmdb "^2.1.7" - lock "^1.1.0" - node-object-hash "^2.3.10" - proper-lockfile "^4.1.2" - resolve-from "^5.0.0" - tmp "^0.2.1" - xdg-basedir "^4.0.0" - gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -15719,7 +15698,7 @@ livereload-js@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.3.0.tgz#c3ab22e8aaf5bf3505d80d098cbad67726548c9a" -lmdb@^2.0.2, lmdb@^2.1.7, lmdb@^2.2.6, lmdb@~2.2.3: +lmdb@^2.0.2, lmdb@^2.2.6, lmdb@~2.2.3: version "2.2.6" resolved "https://registry.yarnpkg.com/lmdb/-/lmdb-2.2.6.tgz#a52ef533812b8abcbe0033fc9d74d215e7dfc0a0" integrity sha512-UmQV0oZZcV3EN6rjcAjIiuWcc3MYZGWQ0GUYz46Ron5fuTa/dUow7WSQa6leFkvZIKVUdECBWVw96tckfEzUFQ==