Skip to content

Commit

Permalink
♻️ (dmk) [NO-ISSUE]: Add type check (#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyuzhuang authored Jan 7, 2025
2 parents 9adc4a8 + 837b301 commit 0226ac5
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ export class BleDeviceConnection implements DeviceConnection {
value: { buffer },
},
} = event;
if (!this._isDeviceReady) {
this.onReceiveSetupApduResponse(buffer);
} else {
this.receiveApdu(buffer);
if (buffer instanceof ArrayBuffer) {
if (!this._isDeviceReady) {
this.onReceiveSetupApduResponse(buffer);
} else {
this.receiveApdu(buffer);
}
}
};

Expand Down

0 comments on commit 0226ac5

Please sign in to comment.