narenbakshi97/Pokemon-Simulator

Ditto Attacks not getting displayed

Open

#13 opened on Feb 22, 2021

 (0 comments) (0 reactions) (0 assignees)JavaScript (7 forks)auto 404
APIbuggood first issuejavascript

Repository metrics

Stars
 (2 stars)
PR merge metrics
 (PR metrics pending)

Description

Ditto Pokemon mimics the other pokemon's move so maybe, it doesn't have it's set of moves apart from transform, which copies the move of the enemy pokemon

Describe the bug Ditto Pokemon #132 attacks are not getting displayed

To Reproduce Steps to reproduce the behavior:

  1. Catch a Ditto
  2. Select it as your main Pokemon
  3. The Attacks won't appear as buttons

Expected behavior A clear and concise description of what you expected to happen.

Additional context

  • Here's the console message: Uncaught TypeError: Cannot read property 'name' of undefined at showMyAttacks (attack.js:62) at run (game.js:163) at HTMLButtonElement.onclick ((index):36)

  • Take a look at Ditto (132) API call: https://pokeapi.co/api/v2/pokemon/132 Copy Paste the response to https://jsonlint.com/ and look at the structure

Contributor guide