diff --git a/js/esptool.js b/js/esptool.js
index ba4f760..cd4db51 100755
--- a/js/esptool.js
+++ b/js/esptool.js
@@ -268,7 +268,8 @@ class EspLoader {
return value["chipId"]
}
}
- throw("Unable to detect Chip. If you are using a v1 Programmer please use the Python Flasher for now!");
+ this.logMsg("Detection failed and WebFlasher cannot continue.");
+ throw("Unable to detect OMG Device. If you are using a v1 Programmer from 2020 (lacks USB-C) please use the Python Flasher for now!
Otherwise, click the Help button below for common fixes & refresh this page to attempt flashing again.");
}
/**
diff --git a/js/script.js b/js/script.js
index 1960f8b..b204bd7 100644
--- a/js/script.js
+++ b/js/script.js
@@ -386,7 +386,7 @@ async function disconnect() {
async function setStatusAlert(message, status = "success") {
let constructedStatus = "alert-" + status;
statusAlertBox.classList.add(constructedStatus);
- if(message.includes("")){
+ if(message.includes("")||message.includes("
")){
statusAlertBox.innerHTML = message;
} else {
statusAlertBox.innerText = message;
@@ -1511,12 +1511,10 @@ function toggleUIHardware(ready) {
function toggleUIConnected(connected, msg = "") {
let lbl = "Connect";
let message = "Cannot connect to O.MG Device.";
- if(msg!=""){
- if(msg instanceof DOMException){
- message = msg.message.replace(/^[^:]*:/, '').trim();
- } else {
- message = msg.replace(/^[^:]*:/, '').trim();
- }
+ if (msg instanceof DOMException) {
+ message = msg.message.replace(/^[^:]*:/, '').trim();
+ } else if (typeof msg === "string") {
+ message = msg.replace(/^[^:]*:/, '').trim();
}
if (connected) {
butProgram.disabled = false;
@@ -1531,7 +1529,8 @@ function toggleUIConnected(connected, msg = "") {
//butProgram.disabled = true;
lbl = "Error";
sdstat("error","hardware-missing");
- let err = `${message} Click the Help button below for common fixes. Then refresh this page to attempt flashing again.`;
+ let err = `${message}`
+ // Click the Help button below for common fixes. Then refresh this page to attempt flashing again.`;
setStatusAlert(err, "danger");
accordionExpand(2);
accordionDisable();