Open adriandarian opened 4 years ago
This also Fixes #182
I suppose you can also just add a let
in front of the variable...
let allSwipedCheck = () => newCardIndex === this.state.cards.length
Yep, this fixed the same issue on my cards
I cloned a fresh version of the repo and currently on version
^v1.6.7
. I came across a bug where the allSwipedCheck was undefined because in the codebase in theincrementCardIndex()
there was a code snippet like this:However, the variable is never initialized or declared or even defined prior. So I checked if it was used anywhere else and noticed that it is only used for the 2 if statements right below the assignment.
Solution: Remove the assignment and place the condition into both if statements.