diff --git a/packages/sdk/src/sync-agent/spaces/models/space.ts b/packages/sdk/src/sync-agent/spaces/models/space.ts index 86ccab77d..4d6d7c635 100644 --- a/packages/sdk/src/sync-agent/spaces/models/space.ts +++ b/packages/sdk/src/sync-agent/spaces/models/space.ts @@ -119,7 +119,7 @@ export class Space extends PersistedObservable { if (this.data.id === streamId) { const stream = this.riverConnection.client?.stream(streamId) check(isDefined(stream), 'stream is not defined') - const channelIds = stream.view.spaceContent.spaceChannelsMetadata.keys() + const channelIds = [...stream.view.spaceContent.spaceChannelsMetadata.keys()] for (const channelId of channelIds) { if (!this.channels[channelId]) { this.channels[channelId] = new Channel( @@ -130,7 +130,7 @@ export class Space extends PersistedObservable { ) } } - this.setData({ initialized: true }) + this.setData({ initialized: true, channelIds: channelIds }) } }