Skip to content

Commit

Permalink
fix: allow hydrating thread's channel with an empty members list (#1359)
Browse files Browse the repository at this point in the history
  • Loading branch information
myandrienko authored Sep 11, 2024
1 parent 599385d commit 0946f45
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ export class Thread<SCG extends ExtendableGenerics = DefaultGenerics> {
const channel = client.channel(threadData.channel.type, threadData.channel.id, {
name: threadData.channel.name,
});

if (threadData.channel.members) {
channel._hydrateMembers(threadData.channel.members);
}
channel._hydrateMembers(threadData.channel.members ?? []);

this.state = new StateStore<ThreadState<SCG>>({
active: false,
Expand Down

0 comments on commit 0946f45

Please sign in to comment.