whatadewitt / yahoo-fantasy-sports-api

NodeJS wrapper for the Yahoo! Fantasy Sports API
https://yahoo-fantasy-node-docs.vercel.app/
MIT License
200 stars 54 forks source link

TypeError: date.indexOf is not a function in rosterResource.mjs #61

Closed ptoninato closed 4 years ago

ptoninato commented 4 years ago

I ran into an error while fetching data between an MLB league and an NFL league. If it was NFL, the 'date' value was coming as a integer. But it was throwing an error because you cannot do an indexOf() on an integer.

I changed the logic to check if the number is not an integer before doing the indexOf (which might not even be necessary anymore).