Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

What is the recomended way of supporting limited amount of cards? #86

Open
stefek99 opened this issue Apr 15, 2016 · 3 comments
Open

What is the recomended way of supporting limited amount of cards? #86

stefek99 opened this issue Apr 15, 2016 · 3 comments

Comments

@stefek99
Copy link

bug-report

See also #85

If we have unlimited cards - no problem.

As we have finite amount - accessing third form the end triggers an error (see image attached)

@dan-diddy
Copy link

On line 385 in your screenshot you check whether there's a second card. Why not just use that to check for the third card? Presumably you could put that check in a while loop. Alternatively, you also know the length of the array so you could easily write a for loop.

@stefek99
Copy link
Author

On line 385 in your screenshot you check whether there's a second card. Why not just use that to check for the third card? Presumably you could put that check in a while loop. Alternatively, you also know the length of the array so you could easily write a for loop.

@dan-diddy Yep, checking if the array contains the element would fix my issue in my copy of the library, that would have to be served from my local server instead of the CDN.

How about all the other libraries in the wild?

My gut feeling would be to fix the library.

@keithdmoore
Copy link
Contributor

@stefek99 If you are willing to fix it, I am willing to merge the PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants