Skip to content

Commit

Permalink
Fix crash in EV guesser
Browse files Browse the repository at this point in the history
  • Loading branch information
Zarel committed Mar 4, 2019
1 parent a809d90 commit d73bea8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
"BattleFormats": false, "BattleFormatsData": false, "BattleLearnsets": false, "BattleItems": false, "BattleMoveAnims": false, "BattleMovedex": false, "BattleNatures": false,
"BattleOtherAnims": false, "BattlePokedex": false,"BattlePokemonSprites": false, "BattlePokemonSpritesBW": false, "BattleSearchCountIndex": false, "BattleSearchIndex": false, "BattleArticleTitles": false,
"BattleSearchIndexOffset": false, "BattleSearchIndexType": false, "BattleStatIDs": false, "BattleStatNames": false, "BattleStats": false, "BattleStatusAnims": false, "BattleStatuses": false, "BattleTeambuilderTable": false,
"ModifiableValue": false,
"ModifiableValue": false, "BattleStatGuesser": false,

// Generic global variables
"Config": false, "BattleSearch": false, "soundManager": false, "Storage": false, "Dex": false,
Expand Down
1 change: 1 addition & 0 deletions src/battle-tooltips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1886,6 +1886,7 @@ class BattleStatGuesser {
}
guessEVs(set: PokemonSet, role: string): Partial<StatsTable> & {plusStat?: StatName | '', minusStat?: StatName | ''} {
if (!set) return {};
if (role === '?') return {};
var template = this.dex.getTemplate(set.species || set.name);
var stats = template.baseStats;

Expand Down

0 comments on commit d73bea8

Please sign in to comment.