Closed gricha2380 closed 6 years ago
solved. I added a conditional check for match[0] !== " "
so the range doesn't flow to matchSet, and in matchSet I placed another check: resultArray[i] !== ' '
. But ultimately, what fixed it? I had to raise the limit on my infinite loop counter. counter >=10
was too low. Doh.
I'm still leaving the new checks in place though.
Currently
matchEnemies()
adds a check to blank spaces. In the process it also offsets the addClass leaving out the last digit. This can be repro'd by playing Not a Digit card with "hello world" string.