mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-30 14:52:36 -05:00
Suppress a crash when types are unknown
This commit is contained in:
@@ -781,9 +781,13 @@
|
||||
text += '<small>(Type changed)</small><br />';
|
||||
types = [pokemon.volatiles.typechange[2]];
|
||||
}
|
||||
text += Tools.getTypeIcon(types[0]);
|
||||
if (types[1]) {
|
||||
text += ' '+Tools.getTypeIcon(types[1]);
|
||||
if (types) {
|
||||
text += Tools.getTypeIcon(types[0]);
|
||||
if (types[1]) {
|
||||
text += ' '+Tools.getTypeIcon(types[1]);
|
||||
}
|
||||
} else {
|
||||
text += 'Types unknown';
|
||||
}
|
||||
text += '</h2>';
|
||||
var exacthp = '';
|
||||
|
||||
Reference in New Issue
Block a user