I think this should be better
parent
9fb2ccedce
commit
d2584ae653
14
main.js
14
main.js
|
@ -20,10 +20,14 @@ async function getPayloadList(){
|
|||
|
||||
(async () => {
|
||||
const payloadSelect = document.getElementById("payloadSelect");
|
||||
|
||||
let payloadList;
|
||||
try {
|
||||
const payloadList = await getPayloadList();
|
||||
payloadList = await getPayloadList();
|
||||
|
||||
} catch (error) {
|
||||
logOutput("There was a problem retreiving the payload list. Error: " + error);
|
||||
return;
|
||||
}
|
||||
payloadList.forEach((payload) => {
|
||||
const payloadOption = document.createElement("option");
|
||||
|
||||
|
@ -32,9 +36,7 @@ async function getPayloadList(){
|
|||
|
||||
payloadSelect.appendChild(payloadOption);
|
||||
});
|
||||
} catch (error) {
|
||||
logOutput("There was a problem retreiving the payload list. HTTP error code: " + error)
|
||||
}
|
||||
|
||||
})()
|
||||
|
||||
async function getPayload(payloadSrc){
|
||||
|
@ -191,7 +193,7 @@ document.getElementById("goButton").addEventListener("click", async () => {
|
|||
try {
|
||||
payload = new Uint8Array(await getPayload(payloadPath));
|
||||
} catch (error) {
|
||||
logOutput("There was a problem retreiving the payload. HTTP error code: " + error)
|
||||
logOutput("There was a problem retreiving the payload. Error: " + error)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue