Fixed random quote going out of bounds
This commit is contained in:
parent
440595e371
commit
e914ca9ded
@ -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))];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user