Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem recognising a mastercard as maestro in IE8 #3

Open
DimitarChristoff opened this issue Jun 1, 2011 · 0 comments
Open

problem recognising a mastercard as maestro in IE8 #3

DimitarChristoff opened this issue Jun 1, 2011 · 0 comments

Comments

@DimitarChristoff
Copy link

to replicate: use card "5473677027371724" (modded number so remove isValid check)

it will loop through the object and the number above will satisfy both mastercard and maestro but the result will be at random, dependent on browser.

your loop takes cards from the CARDS property BUT as that is an object, there are no guarantees on the order in which they arrive (as per ES this is correct).

it's usually in order of entry but not always - IE8 and Chrome can often loop through a different order.

To fix this, I have reverted this.CARDS to an array and then use this.CARDS.some to only get a singular match,

Can't be bothered with a pull request but here's a gist of what I use now: https://gist.github.com/1002106

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

No branches or pull requests

1 participant