Skip to content

Commit d895158

Browse files
authored
Teambuilder: Fix error on set import for formats without dex sets (#2332)
Currently throws a console error when you click "Import/Export" on a pokemon set when building a team for a format that doesn't have sets on the smogdex (Example: Gen 4 1v1). Notably this prevents box sets from showing up for those formats
1 parent db2b940 commit d895158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

play.pokemonshowdown.com/js/client-teambuilder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,7 @@
18401840
var $userSetDiv = this.$('.teambuilder-pokemon-import .teambuilder-import-user-sets');
18411841
$userSetDiv.empty();
18421842

1843-
if (smogonFormatSets) {
1843+
if (smogonFormatSets && smogonFormatSets['dex']) {
18441844
var smogonSets = $.extend({}, smogonFormatSets['dex'][species], (smogonFormatSets['stats'] || {})[species]);
18451845
$smogonSetDiv.text('Sample sets: ');
18461846
for (var set in smogonSets) {

0 commit comments

Comments
 (0)