Don't include "Ability: No Ability" in team exports#2683
Open
mnn31 wants to merge 1 commit into
Open
Conversation
The legacy client's team export in storage.js printed an `Ability: <ability>` line whenever the set had an ability string, including the literal "No Ability" placeholder used for Gen 1/2 Pokemon. The newer Preact-side exportSet in battle-teams.ts already filters this out; this brings the legacy path in line. Fixes smogon#2216.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #2216 (reported by @davidstone).
the legacy client's team export in `js/storage.js` printed an `Ability: ` line whenever the set had any ability string, including the literal `"No Ability"` placeholder used for Gen 1/2 Pokemon. result was every past-gen team export had a useless `Ability: No Ability` line on every set.
the newer Preact-side `exportSet` in `src/battle-teams.ts:316` already has this guard:
```ts
} else if (set.ability && set.ability !== 'No Ability') {
text += `Ability: ${set.ability}\n`;
}
```
this just brings the legacy path in line — same condition, single line change.
re: #2215 in the same area — leaving that one alone since @Zarel commented there that he's tracking it for the Preact client rewrite (needs separate handling of "default vs intentionally maxed" EVs), so it'd be stepping on that work.
test plan