forked from Adleraci/adlerka.top
fix js
This commit is contained in:
parent
6f4e8a4b43
commit
4c748a1007
@ -91,11 +91,10 @@ async function doPageAction(requestData, wantsReturn = false) {
|
|||||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wantsReturn) {
|
|
||||||
return await response.json();
|
|
||||||
} else {
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
handlePageResponse(data);
|
handlePageResponse(data);
|
||||||
|
if (wantsReturn) {
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
|
Loading…
Reference in New Issue
Block a user