mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-02-02 07:31:38 +01:00
Simplify code
This commit is contained in:
parent
826835e518
commit
c6691cf1cb
@ -125,12 +125,12 @@ async function handleRequest(request) {
|
||||
|
||||
async function handleConfigRequest(request) {
|
||||
let response = await readCache(request);
|
||||
const networkResponsePromise = fetchAndUpdateConfig(request);
|
||||
if (response) {
|
||||
fetchAndUpdateConfig(request);
|
||||
return response;
|
||||
} else {
|
||||
return await networkResponsePromise;
|
||||
}
|
||||
response = await fetchAndUpdateConfig(request);
|
||||
return response;
|
||||
}
|
||||
|
||||
async function fetchAndUpdateConfig(request) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user