We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0292581 commit e13483fCopy full SHA for e13483f
src/components/PageHeader/HomePage.astro
@@ -47,7 +47,8 @@ const { config } = Astro.props;
47
// find all hero image elements
48
const images = document.querySelectorAll("img.hero-image");
49
if (images.length > 1) {
50
- const shownImageInd = Math.round(Math.random() * images.length);
+ const shownImageInd = Math.round(Math.random() * (images.length - 1));
51
+ console.log(shownImageInd);
52
// hide the default one
53
images[0].classList.add("hidden");
54
// show a random one
0 commit comments