mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-10-31 19:39:20 +08:00 
			
		
		
		
	Merge pull request #2975 from chakflying/fix/badge-no-label
Fix: Allow status badge with empty label
This commit is contained in:
		| @@ -147,7 +147,11 @@ router.get("/api/badge/:id/status", cache("5 minutes"), async (request, response | ||||
|             const heartbeat = await Monitor.getPreviousHeartbeat(requestedMonitorId); | ||||
|             const state = overrideValue !== undefined ? overrideValue : heartbeat.status; | ||||
|  | ||||
|             badgeValues.label = label ?? "Status"; | ||||
|             if (label === undefined) { | ||||
|                 badgeValues.label = "Status"; | ||||
|             } else { | ||||
|                 badgeValues.label = label; | ||||
|             } | ||||
|             switch (state) { | ||||
|                 case DOWN: | ||||
|                     badgeValues.color = downColor; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user