Skip to content

Commit

Permalink
fix: attachment can be a null (#877)
Browse files Browse the repository at this point in the history
  • Loading branch information
threepointone committed May 17, 2024
1 parent 16ec02f commit 23b00b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/green-onions-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"partykit": patch
---

fix: attachment can be a null
2 changes: 1 addition & 1 deletion packages/partykit/facade/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const createLazyConnection = (
deserializeAttachment: {
value: function deserializeAttachment<T = unknown>() {
const attachment = attachments.get(ws);
return (attachment.__user ?? null) as T;
return (attachment?.__user ?? null) as T;
}
},

Expand Down

0 comments on commit 23b00b5

Please sign in to comment.