Skip to content

Local not restoring Set data type in Entity #453

@sam-goodwin

Description

@sam-goodwin

If an Entity contains a Set:

const Topic = z.object({
  topicID: z.string().uuid(),
  subscribers: z.set(z.string()),
});

Then it is not properly reified when restarting local

file:///Users/samgoodwin/workspaces/eventual-service/packages/service/lib/yjs/subscriptions.js:26
                subscribers: topic?.subscribers.add(connectionId) ?? new Set([connectionId]),
                                                ^

TypeError: topic?.subscribers.add is not a function
    at file:///Users/samgoodwin/workspaces/eventual-service/packages/service/src/yjs/subscriptions.ts:40:32
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions