Fix: 修复平板下烧录按钮可见以及提示信息显示异常

This commit is contained in:
王立帮
2025-03-07 19:56:03 +08:00
parent 4bbd2dcc96
commit 8c70cffd25
2 changed files with 10 additions and 3 deletions

View File

@@ -250,7 +250,7 @@ BU.burnWithEsptool = async (binFile, erase) => {
}
}
const port = Serial.getPort(portName);
if (port instanceof window.HIDDevice || port instanceof window.USBDevice) {
if (['HIDDevice', 'USBDevice'].includes(port.constructor.name)) {
layer.msg(Msg.Lang['burn.notSupport'], { time: 1000 });
return;
}
@@ -370,7 +370,7 @@ BU.burnWithAdafruitEsptool = async (binFile, erase) => {
}
}
const port = Serial.getPort(portName);
if (port instanceof window.HIDDevice || port instanceof window.USBDevice) {
if (['HIDDevice', 'USBDevice'].includes(port.constructor.name)) {
layer.msg(Msg.Lang['burn.notSupport'], { time: 1000 });
return;
}