Skip to content

Commit e425088

Browse files
committed
fix: Prevent crash in getLockSequenceNumber when devices is null
1 parent 7e27669 commit e425088

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/p2p/session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2572,7 +2572,7 @@ export class P2PClientProtocol extends TypedEmitter<P2PClientProtocolEvents> {
25722572
if (this.lockSeqNumber === -1) {
25732573
let deviceType = undefined;
25742574
let deviceSN = undefined;
2575-
if (this.rawStation?.devices !== undefined && this.rawStation?.devices.length > 0) {
2575+
if (this.rawStation?.devices?.length > 0) {
25762576
deviceType = this.rawStation?.devices[0]?.device_type;
25772577
deviceSN = this.rawStation?.devices[0]?.device_sn;
25782578
}

0 commit comments

Comments
 (0)