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}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const data = await response.json();
|
||||||
|
handlePageResponse(data);
|
||||||
if (wantsReturn) {
|
if (wantsReturn) {
|
||||||
return await response.json();
|
return data;
|
||||||
} else {
|
|
||||||
const data = await response.json();
|
|
||||||
handlePageResponse(data);
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
|
Loading…
Reference in New Issue
Block a user