From 6cf292946b3bd562c49ae52ca19e014c8da23e52 Mon Sep 17 00:00:00 2001
From: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
Date: Sun, 11 Oct 2020 20:05:52 -0600
Subject: [PATCH] Teambuilder: Improve display for Special Abilities (#1630)
---
js/search.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/js/search.js b/js/search.js
index ddca5668d..15566c9fb 100644
--- a/js/search.js
+++ b/js/search.js
@@ -351,7 +351,11 @@
var unreleasedHidden = pokemon.unreleasedHidden;
if (unreleasedHidden === 'Past' && (this.mod === 'natdex' || gen < 8)) unreleasedHidden = false;
if (abilities['S']) {
- buf += '' + (abilities['H'] || '') + '
' + abilities['S'] + '';
+ if (abilities['H']) {
+ buf += '' + (abilities['H'] || '') + '
(' + abilities['S'] + ')';
+ } else {
+ buf += '(' + abilities['S'] + ')';
+ }
} else if (abilities['H']) {
buf += '' + abilities['H'] + '';
} else {