Fixed random quote going out of bounds

This commit is contained in:
Zakary Timson 2022-05-03 20:31:10 -04:00
parent 440595e371
commit e914ca9ded

View File

@ -22,6 +22,6 @@ export class QuoteService {
* @returns {string} - Quote
*/
random() {
return this.quotes[Math.round(Math.random() * this.quotes.length)];
return this.quotes[Math.round(Math.random() * (this.quotes.length - 1))];
}
}