Skip to content

Commit 23f10a9

Browse files
committed
The real deal (detail has no value)
1 parent 946bac2 commit 23f10a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/js/port_handler.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ PortHandler.initialize = function () {
4242
// Use serial for all protocol events
4343
serial.addEventListener("addedDevice", (event) => {
4444
// Extract the real detail, handling the new structure
45-
const detail = event.detail.value !== undefined ? event.detail.value : event.detail;
45+
const detail = event.detail;
4646

4747
// Determine the device type based on its properties
4848
if (detail?.path?.startsWith("bluetooth")) {
@@ -56,7 +56,7 @@ PortHandler.initialize = function () {
5656

5757
serial.addEventListener("removedDevice", (event) => {
5858
// Extract the real detail, handling the new structure
59-
const detail = event.detail.value !== undefined ? event.detail.value : event.detail;
59+
const detail = event.detail;
6060

6161
// Determine the device type based on its properties
6262
if (detail?.path?.startsWith("bluetooth")) {

0 commit comments

Comments
 (0)