mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 08:20:58 +00:00 
			
		
		
		
	Fix configured service weight = 0 (#2628)
This commit is contained in:
		
							parent
							
								
									1f2081af5d
								
							
						
					
					
						commit
						d61d0eb88f
					
				@ -38,7 +38,7 @@ export async function servicesFromConfig() {
 | 
				
			|||||||
  // add default weight to services based on their position in the configuration
 | 
					  // add default weight to services based on their position in the configuration
 | 
				
			||||||
  servicesArray.forEach((group, groupIndex) => {
 | 
					  servicesArray.forEach((group, groupIndex) => {
 | 
				
			||||||
    group.services.forEach((service, serviceIndex) => {
 | 
					    group.services.forEach((service, serviceIndex) => {
 | 
				
			||||||
      if (!service.weight) {
 | 
					      if (service.weight === undefined) {
 | 
				
			||||||
        servicesArray[groupIndex].services[serviceIndex].weight = (serviceIndex + 1) * 100;
 | 
					        servicesArray[groupIndex].services[serviceIndex].weight = (serviceIndex + 1) * 100;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user