Skip to content

Fixed the deletion of female sprites not visually deleting the sprite in the resource tab#432

Merged
AerunDev merged 2 commits intodevelopfrom
427-fix-a-bug-that-prevents-the-deletion-of-creature-sprites-when-they-are-female-only-or-have-a-different-resource-for-females
Jan 22, 2025
Merged

Fixed the deletion of female sprites not visually deleting the sprite in the resource tab#432
AerunDev merged 2 commits intodevelopfrom
427-fix-a-bug-that-prevents-the-deletion-of-creature-sprites-when-they-are-female-only-or-have-a-different-resource-for-females

Conversation

@Aelysya
Copy link
Collaborator

@Aelysya Aelysya commented Jan 22, 2025

Description

This PR fixes the female sprites deletion in the resource tab of the Pokémon page.
The bug was due to the path falling back to the male sprite when the female couldn't be found.

I added a null check to avoid showing a big '?' when the JSON field is undefined.

closes #427

Tests to perform

Open the resource tab of a Pokémon that has different sprites for males and females (Butterfree, Sneasel, Venusaur, etc...)

  • Deleting a female sprite works properly
  • Deleting a male sprite still works properly

Open the resource tab of a Pokémon that is female-only (Nidoqueen, Vespiquen, Salazzle, etc...)

  • Deleting a sprite works properly

Copy link
Collaborator

@AerunDev AerunDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tout fonctionne nickel, et aucune régression constatée, bien joué ! 😄

…of-creature-sprites-when-they-are-female-only-or-have-a-different-resource-for-females
@AerunDev AerunDev merged commit 8a51889 into develop Jan 22, 2025
2 checks passed
@AerunDev AerunDev deleted the 427-fix-a-bug-that-prevents-the-deletion-of-creature-sprites-when-they-are-female-only-or-have-a-different-resource-for-females branch January 22, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix a bug that prevents the deletion of creature sprites when they are female-only or have a different resource for females

3 participants