Skip to content

Commit

Permalink
fix: assign to the correct object
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed May 9, 2024
1 parent 9e6692a commit fffb64f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/src/models/Gym.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ class Gym extends Model {
gymFields.forEach((field) => (newGym[field] = gym[field]))
}
if (
gym.guarding_pokemon_display !== undefined &&
gym.guarding_pokemon_display !== null
typeof gym.guarding_pokemon_display === 'string' &&
gym.guarding_pokemon_display
) {
gym.guarding_pokemon_display = JSON.parse(
newGym.guarding_pokemon_display = JSON.parse(
gym.guarding_pokemon_display,
)
}
Expand Down

0 comments on commit fffb64f

Please sign in to comment.