Compare commits
	
		
			1 Commits
		
	
	
		
			v2.0
			...
			d3af86be8c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					d3af86be8c | 
@@ -32,6 +32,7 @@ const randomizeHeroBackground = () => {
 | 
				
			|||||||
      if (images.length === 0) return;
 | 
					      if (images.length === 0) return;
 | 
				
			||||||
      let currentIndex = Math.floor(Math.random() * images.length);
 | 
					      let currentIndex = Math.floor(Math.random() * images.length);
 | 
				
			||||||
      heroBg.style.backgroundImage = `url(/img/${images[currentIndex]})`;
 | 
					      heroBg.style.backgroundImage = `url(/img/${images[currentIndex]})`;
 | 
				
			||||||
 | 
					      if (images.length < 2) return; // <-- Prevent interval if only one image
 | 
				
			||||||
      setInterval(() => {
 | 
					      setInterval(() => {
 | 
				
			||||||
        let nextIndex;
 | 
					        let nextIndex;
 | 
				
			||||||
        do {
 | 
					        do {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user