Browse Source

Update

pull/14102/head
Alejandra 1 day ago
parent
commit
c3153cc06f
  1. 10
      docs/en/docs/js/custom.js

10
docs/en/docs/js/custom.js

@ -143,10 +143,16 @@ function handleSponsorImages() {
const imagePromises = Array.from(sponsorImages).map(img => {
return new Promise((resolve, reject) => {
if (img.complete) {
if (img.complete && img.naturalHeight !== 0) {
resolve();
} else {
img.addEventListener('load', resolve);
img.addEventListener('load', () => {
if (img.naturalHeight !== 0) {
resolve();
} else {
reject();
}
});
img.addEventListener('error', reject);
}
});

Loading…
Cancel
Save