mirror of
https://github.com/esphome/esp-web-tools.git
synced 2025-07-28 06:06:36 +00:00
Show alert when opening serial port fails (#123)
This commit is contained in:
parent
91169c1dfa
commit
f3cb744b4f
@ -17,7 +17,12 @@ export const connect = async (button: InstallButton) => {
|
||||
return;
|
||||
}
|
||||
|
||||
await port.open({ baudRate: 115200 });
|
||||
try {
|
||||
await port.open({ baudRate: 115200 });
|
||||
} catch (err: any) {
|
||||
alert(err.message);
|
||||
return;
|
||||
}
|
||||
|
||||
const el = document.createElement("ewt-install-dialog");
|
||||
el.port = port;
|
||||
|
Loading…
x
Reference in New Issue
Block a user