mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-25 07:14:00 +08:00
Fix quotes controller (#2720)
* Fix quotes controller * Additional fixes * Fix
This commit is contained in:
parent
0e1d151112
commit
2d2dc47881
1 changed files with 4 additions and 2 deletions
|
@ -42,7 +42,9 @@ class QuotesController {
|
|||
|
||||
if (this.quoteCollection.language !== normalizedLanguage) {
|
||||
try {
|
||||
const data: QuoteData = await $.getJSON(`quotes/${language}.json`);
|
||||
const data: QuoteData = await $.getJSON(
|
||||
`quotes/${normalizedLanguage}.json`
|
||||
);
|
||||
|
||||
if (data.quotes === undefined || data.quotes.length === 0) {
|
||||
return defaultQuoteCollection;
|
||||
|
@ -62,7 +64,7 @@ class QuotesController {
|
|||
source: quote.source,
|
||||
length: quote.length,
|
||||
id: quote.id,
|
||||
language: language,
|
||||
language: data.language,
|
||||
group: 0,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue