diff --git a/data/abilities.ts b/data/abilities.ts index dc838955233c..8b86d393174c 100644 --- a/data/abilities.ts +++ b/data/abilities.ts @@ -1695,7 +1695,7 @@ export const Abilities: {[abilityid: string]: AbilityData} = { }, // The Dive part of this mechanic is implemented in Dive's `onTryMove` in moves.ts onSourceTryPrimaryHit(target, source, effect) { - if (effect && effect.id === 'surf' && source.hasAbility('gulpmissile') && source.species.name === 'Cramorant') { + if (effect?.id === 'surf' && source.hasAbility('gulpmissile') && source.species.name === 'Cramorant') { const forme = source.hp <= source.maxhp / 2 ? 'cramorantgorging' : 'cramorantgulping'; source.formeChange(forme, effect); }