Skip to content

Commit 4397630

Browse files
Merge pull request #664 from markgrovs/fix-lock-sequence-crash
fix: Prevent crash in getLockSequenceNumber when devices is null
2 parents 7e27669 + e425088 commit 4397630

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)