From 8403255aa8173198fc0b1d238c46ca8f9a835e6f Mon Sep 17 00:00:00 2001 From: harryob Date: Sat, 25 Nov 2023 11:43:46 +0000 Subject: [PATCH] here too --- tgui/packages/tgui/interfaces/Orbit/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tgui/packages/tgui/interfaces/Orbit/index.tsx b/tgui/packages/tgui/interfaces/Orbit/index.tsx index afa446f20109..83dfe3b361b2 100644 --- a/tgui/packages/tgui/interfaces/Orbit/index.tsx +++ b/tgui/packages/tgui/interfaces/Orbit/index.tsx @@ -252,7 +252,9 @@ const ObservableTooltip = (props: { item: Observable }) => { const { item: { caste, health, job, full_name, icon, background_color }, } = props; - const displayHealth = !!health && health >= 0 ? `${health}%` : 'Critical'; + + const displayHealth = typeof health === 'number'; + const healthText = !!health && health >= 0 ? `${health}%` : 'Critical'; return ( @@ -275,8 +277,8 @@ const ObservableTooltip = (props: { item: Observable }) => { {job} )} - {!!health && ( - {displayHealth} + {displayHealth && ( + {healthText} )} );