Skip to content

Commit

Permalink
fix: remove hack (possible HID.HID that exposed a devicePath)
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Dec 4, 2023
1 parent 1bc87ba commit fca382d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/node/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ export async function setupXkeysPanel(
productId: devicePathOrHIDDevice.productId,
interface: devicePathOrHIDDevice.interface,
}
} else if (
typeof devicePathOrHIDDevice === 'object' &&
typeof (devicePathOrHIDDevice as any).devicePath === 'string'
) {
// (backwards compatibility): has { devicePath: string }

devicePath = (devicePathOrHIDDevice as any).devicePath
device = await HID.HIDAsync.open(devicePath)
} else if (typeof devicePathOrHIDDevice === 'string') {
// is string (path)

Expand Down

0 comments on commit fca382d

Please sign in to comment.