Merge pull request #6506 from betagouv/fix-pays-on-edge
Correction du champ "Pays" sous Edge et Safari (#6506)
This commit is contained in:
commit
07481d1093
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
import { QueryClient } from 'react-query';
|
||||
import { isNumeric } from '@utils';
|
||||
import { getJSON, isNumeric } from '@utils';
|
||||
import { matchSorter } from 'match-sorter';
|
||||
|
||||
const API_EDUCATION_QUERY_LIMIT = 5;
|
||||
|
@ -73,7 +73,7 @@ async function defaultQueryFn({ queryKey: [scope, term] }) {
|
|||
let paysCache;
|
||||
async function getPays() {
|
||||
if (!paysCache) {
|
||||
paysCache = await fetch('/api/pays').then((response) => response.json());
|
||||
paysCache = await getJSON('/api/pays', null);
|
||||
}
|
||||
return paysCache;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue