From 2b655fb509feab0e8a151dfe51380d35b1fec6dd Mon Sep 17 00:00:00 2001 From: Karthik <32044378+Karthik99999@users.noreply.github.com> Date: Sat, 29 Jan 2022 18:20:10 -0500 Subject: [PATCH] Tooltips: Fix small display issue in Gen 2 (#1933) --- src/battle-tooltips.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/battle-tooltips.ts b/src/battle-tooltips.ts index 7e9abe516..99d421236 100644 --- a/src/battle-tooltips.ts +++ b/src/battle-tooltips.ts @@ -864,14 +864,16 @@ class BattleTooltips { if (item) itemText = 'Item: ' + item + itemEffect; } - text += '
'; - text += abilityText; - if (itemText) { - // ability/item on one line for your own switch tooltips, two lines everywhere else - text += (!isActive && serverPokemon ? ' / ' : '
'); + if (abilityText || itemText) { + text += '
'; + text += abilityText; + if (abilityText && itemText) { + // ability/item on one line for your own switch tooltips, two lines everywhere else + text += (!isActive && serverPokemon ? ' / ' : '
'); + } text += itemText; + text += '
'; } - text += ''; text += this.renderStats(clientPokemon, serverPokemon, !isActive);