Fix config.json being cached
This commit is contained in:
@@ -13,7 +13,7 @@ export const WebConfigProvider: FC = ({ children }) => {
|
||||
useEffect(() => {
|
||||
const fetchConfig = async () => {
|
||||
try {
|
||||
const response = await fetchLocal('config.json', { cache: 'no-cache' });
|
||||
const response = await fetchLocal('config.json', { cache: 'no-store' });
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('network response was not ok');
|
||||
|
||||
@@ -7,7 +7,7 @@ async function getConfig() {
|
||||
if (data) return Promise.resolve(data);
|
||||
try {
|
||||
const response = await fetchLocal('config.json', {
|
||||
cache: 'no-cache'
|
||||
cache: 'no-store'
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user