Skip to content

Commit

Permalink
locks: Update message.extras check
Browse files Browse the repository at this point in the history
Signed-off-by: Lewis Marshall <lewis.marshall@ably.com>
  • Loading branch information
lmars committed Aug 11, 2023
1 parent 5faea09 commit e58bcc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Locks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default class Locks extends EventEmitter<LockEventMap> {
return;
}

if (!message.extras || !message.extras.locks || !Array.isArray(message.extras.locks)) {
if (!Array.isArray(message?.extras?.locks)) {
// there are no locks in presence, so release any existing locks for the
// member
for (const [id, lock] of member.locks.entries()) {
Expand Down

0 comments on commit e58bcc4

Please sign in to comment.