Skip to content

Commit

Permalink
Fix attribute deletion (#1285)
Browse files Browse the repository at this point in the history
* Fix attribute deletion

* Create silver-owls-brush.md
  • Loading branch information
lukasIO authored Oct 11, 2024
1 parent f0ad7e5 commit 9b13728
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/silver-owls-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Fix attribute deletion
5 changes: 4 additions & 1 deletion src/room/participant/LocalParticipant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ export default class LocalParticipant extends Participant {
(!name || this.name === name) &&
(!metadata || this.metadata === metadata) &&
(!attributes ||
Object.entries(attributes).every(([key, value]) => this.attributes[key] === value))
Object.entries(attributes).every(
([key, value]) =>
this.attributes[key] === value || (value === '' && !this.attributes[key]),
))
) {
this.pendingSignalRequests.delete(requestId);
resolve();
Expand Down

0 comments on commit 9b13728

Please sign in to comment.