mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-05-31 21:22:20 -05:00
Fix parseDetails erroring when passed nil details
This commit is contained in:
parent
eada1ce8c0
commit
5f01c13533
|
|
@ -4401,6 +4401,7 @@ function Battle(frame, logFrame, noPreload) {
|
|||
} */
|
||||
this.parseDetails = function (name, pokemonid, details, output) {
|
||||
if (!output) output = {};
|
||||
if (!details) details = "";
|
||||
output.details = details;
|
||||
output.name = name;
|
||||
output.species = name;
|
||||
|
|
@ -4518,7 +4519,7 @@ function Battle(frame, logFrame, noPreload) {
|
|||
pokemon.searchid = searchid;
|
||||
pokemon.ident = pokemonid;
|
||||
if (pokemon.needsReplace) {
|
||||
pokemon = self.p1.newPokemon(self.parseDetails(name, pokemonid, details || ""), i);
|
||||
pokemon = self.p1.newPokemon(self.parseDetails(name, pokemonid, details), i);
|
||||
}
|
||||
}
|
||||
pokemon.slot = slot;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user