Skip to content

Commit

Permalink
Playground: remove unnecessary check
Browse files Browse the repository at this point in the history
Because we want to pre load everything, we should allow the system to make channel objects even if we don’t have local data for them yet. We do the same thing with members.
  • Loading branch information
texuf committed Sep 6, 2024
1 parent 06bc27e commit 4306af3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/sdk/src/sync-agent/spaces/models/space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ export class Space extends PersistedObservable<SpaceModel> {
}

getChannel(channelId: string): Channel {
if (!this.data.channelIds.includes(channelId)) {
throw new Error(`channel ${channelId} not found in space ${this.data.id}`)
}
if (!this.channels[channelId]) {
this.channels[channelId] = new Channel(
channelId,
Expand Down

0 comments on commit 4306af3

Please sign in to comment.