Skip to content

Commit

Permalink
Error out when uploading empty teams
Browse files Browse the repository at this point in the history
  • Loading branch information
mia-pi-git committed Sep 30, 2023
1 parent a7b9fe5 commit 5142e94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/client-teambuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,9 @@
buf.push(this.curTeam.name);
buf.push(this.curTeam.format);
buf.push(this.curTeam.privacy ? 1 : 0);
buf.push(Storage.exportTeam(this.curSetList, this.curTeam.gen, false));
var team = Storage.exportTeam(this.curSetList, this.curTeam.gen, false);
if (!team) return app.addPopupMessage("Add a Pokémon to your team before uploading it!");
buf.push(team);
app.send(cmd + " " + buf.join(', '));
this.exported = true;
$('button[name=psExport]').addClass('disabled');
Expand Down

0 comments on commit 5142e94

Please sign in to comment.