From fcbd70e9a0467d7408b1492b39fcb87510def707 Mon Sep 17 00:00:00 2001 From: pyuk-bot Date: Wed, 14 May 2025 15:42:48 -0500 Subject: [PATCH] Preact: Fix PP display on buttons for moves with no max PP (#2420) --- play.pokemonshowdown.com/src/panel-battle.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/play.pokemonshowdown.com/src/panel-battle.tsx b/play.pokemonshowdown.com/src/panel-battle.tsx index 15c59f2f7..1861b3b13 100644 --- a/play.pokemonshowdown.com/src/panel-battle.tsx +++ b/play.pokemonshowdown.com/src/panel-battle.tsx @@ -153,15 +153,16 @@ class BattleDiv extends preact.Component<{ room: BattleRoom }> { } function MoveButton(props: { - cmd: string, type: Dex.TypeName, tooltip: string, moveData: { pp: number, maxpp: number, disabled?: boolean }, + cmd: string, type: Dex.TypeName, tooltip: string, moveData: { pp?: number, maxpp?: number, disabled?: boolean }, children: string, }) { + const pp = props.moveData.maxpp ? `${props.moveData.pp!}/${props.moveData.maxpp}` : '–'; return ; } function PokemonButton(props: {