Closed t-mathis closed 9 years ago
Thanks for the (really detailed) bug report! I think it's worth noting that the ghost entries disappear on refresh, which means that they are getting cleared from local storage, but aren't being deleted from the table for whatever reason.
Hold that - the fix doesn't work for loading caught pokemon from local storage, as the fix assigns them all the same ID on page load.
Scrub that, I forgot what the bug even was! It seems to be in that the initialize function of CaughtTableRow is using the last entry in localstorage for all but actually filling in the template, so if you set Bulbasaur, Ivysaur, and Venusaur as caught, they'll display as Bulbasaur, Ivysaur, and Venusaur but have the same ID (caughtPokemon-venusaur)
Adding then removing from the "Pokemon" tab does not remove entries from the "Caught" tab. Here's the steps I took to make this happen: 1) Refresh the page. 2) Mark Bulbasaur as "Caught" from the "Pokemon" tab using the pokeball. 3) Validate that Bulbasaur was added under "Caught" and it displays 1 caught Pokemon. 4) Unmark Bulbasaur as "Caught" from the "Pokemon" tab using the gray pokeball. 5) Bulbasaur remains under the "Caught" tab but it will display 0 caught Pokemon.
Continuing to repeat steps 2 and 4 will cause more "ghost" Bulbasaur entries to appear. Clicking on the gray pokeball on these ghost entries on the "Caught" tab doesn't do anything. I attached a screenshot, hopefully.