Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Update templates/menu.html
Browse files- templates/menu.html +10 -6
    	
        templates/menu.html
    CHANGED
    
    | @@ -590,13 +590,17 @@ function updateCartDisplay(cart) { | |
| 590 |  | 
| 591 | 
             
                  // Function to round reward points to a single digit
         | 
| 592 | 
             
                    function roundRewardPoints() {
         | 
| 593 | 
            -
             | 
| 594 | 
            -
             | 
| 595 | 
            -
                
         | 
| 596 | 
            -
             | 
| 597 | 
            -
             | 
| 598 | 
            -
                         | 
| 599 | 
             
                    }
         | 
|  | |
|  | |
|  | |
|  | |
| 600 | 
             
                    // Run the function when the page loads
         | 
| 601 | 
             
                    window.onload = roundRewardPoints;
         | 
| 602 |  | 
|  | |
| 590 |  | 
| 591 | 
             
                  // Function to round reward points to a single digit
         | 
| 592 | 
             
                    function roundRewardPoints() {
         | 
| 593 | 
            +
                let rewardPointsElement = document.getElementById('reward-points');
         | 
| 594 | 
            +
             | 
| 595 | 
            +
                if (rewardPointsElement) {
         | 
| 596 | 
            +
                    let rewardPoints = parseFloat(rewardPointsElement.innerText);
         | 
| 597 | 
            +
                    if (!isNaN(rewardPoints)) {
         | 
| 598 | 
            +
                        rewardPointsElement.innerText = rewardPoints.toFixed(1); // Rounding to 1 decimal place
         | 
| 599 | 
             
                    }
         | 
| 600 | 
            +
                } else {
         | 
| 601 | 
            +
                    console.error("Reward points element is missing.");
         | 
| 602 | 
            +
                }
         | 
| 603 | 
            +
            }
         | 
| 604 | 
             
                    // Run the function when the page loads
         | 
| 605 | 
             
                    window.onload = roundRewardPoints;
         | 
| 606 |  | 
 
			
