Skip to content

Commit

Permalink
fix(transport): NodeUsb always return Buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonlesisz committed Jul 29, 2024
1 parent 31e1382 commit 9186c1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/transport/src/api/usb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class UsbApi extends AbstractApi {
return this.error({ error: ERRORS.INTERFACE_DATA_TRANSFER });
}

return this.success(res.data.buffer);
return this.success(Buffer.from(res.data.buffer));
} catch (err) {
this.logger?.error(`usb: device.transferIn error ${err}`);
if (err.message === INTERFACE_DEVICE_DISCONNECTED) {
Expand Down

0 comments on commit 9186c1c

Please sign in to comment.