Skip to content

Commit

Permalink
πŸš‘ (web-ble): Add type check
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyuzhuang committed Jan 6, 2025
1 parent 0af4ba7 commit d23a30f
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 d23a30f

Please sign in to comment.