Skip to content

Commit

Permalink
Initialize synchronizer with collection
Browse files Browse the repository at this point in the history
  • Loading branch information
ebouck committed Oct 22, 2024
1 parent 61ad46a commit bbf9983
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tiny-beers-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@runlightyear/lightyear": minor
---

Fix Synchronizer initialization bug
6 changes: 5 additions & 1 deletion packages/@runlightyear/lightyear/src/base/syncAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface ConnectorProps {

export interface SynchronizerProps {
connector: AuthConnector;
collection: string;
}

export interface DefineSyncActionProps {
Expand Down Expand Up @@ -94,7 +95,10 @@ export function defineSyncAction(props: DefineSyncActionProps) {
throw new Error("No connector provided");
}

const synchronizerProps: SynchronizerProps = { connector };
const synchronizerProps: SynchronizerProps = {
connector,
collection: props.collection,
};

let synchronizer: CollectionSynchronizer | null | undefined = undefined;

Expand Down

0 comments on commit bbf9983

Please sign in to comment.