This commit is contained in:
Bruno Rybársky 2024-02-06 16:37:23 +01:00
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);