auth0-blog / nodejs-jwt-authentication-sample

A NodeJS API that supports username and password authentication with JWTs
MIT License
688 stars 267 forks source link

random-quote occasionally returns empty string as a quote #22

Closed kmaida closed 7 years ago

kmaida commented 7 years ago

Currently, the API can occasionally return empty when fetching quotes. This is due to zero-indexing when selecting from the quotes array and the use of length to get the quote position. The way it's randomizing, it can currently try to return a quote at one position after the last quote.

A fix is forthcoming shortly.