Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
loucadufault committed Dec 4, 2024
1 parent 913403b commit faa35ef
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/webhid/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,18 @@ export async function setupXkeysPanel(browserDevice: HIDDevice): Promise<XKeys>
console.error(`Xkeys: Error emitted after setup already rejected:`, e)
return
}
deviceWrap.close()
deviceWrap
.close()
.then(() => reject())
.catch(reject)
.finally(() => (alreadyRejected = true))
}
// Handle all error events until the instance is returned
// Handle all error events until the instance is returned
xkeys.on('error', xkeysStopgapErrorHandler)

// Wait for the device to initialize:
xkeys.init()
xkeys
.init()
.then(() => {
resolve(xkeys)
xkeys.removeListener('error', xkeysStopgapErrorHandler)
Expand Down

0 comments on commit faa35ef

Please sign in to comment.