davidchambers / tutor

JavaScript interface for the Gatherer card database
https://gatherer.wizards.com/
Do What The F*ck You Want To Public License
149 stars 18 forks source link

Can't catch exception when non-existent card is passed into tutor.card via name #93

Closed CBXZero closed 8 years ago

CBXZero commented 9 years ago
try {
        tutor.card({ name: cardText}, function(err, card) {

throws an exception if the card doesn't exist much like issue #90 . I believe this is because gatherer's formatting and the title tag is no longer consistent. I think it would be more appropriate to check for something that is exclusively found on a card result page (like the div that contains the card image, since this div doesn't exist when multiple cards are returned as results).