Skip to content

Commit

Permalink
pass custom migrations to useLocalStore (tldraw#5135)
Browse files Browse the repository at this point in the history
Fixes
https://discord.com/channels/859816885297741824/859816885801713728/1318729897958707312

Fixed a bug with locally synced stores where custom migrations were not
being passed to the store constructor

### Change type

- [x] `bugfix`

### Release notes

- Fixed a bug with locally synced stores where custom migrations were
not being passed to the store constructor.
  • Loading branch information
ds300 authored Jan 13, 2025
1 parent c422deb commit ed9c077
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/editor/src/lib/TldrawEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ function TldrawEditorWithOwnStore(
sessionId,
user,
assets,
migrations,
} = props

const syncedStore = useLocalStore({
Expand All @@ -308,6 +309,7 @@ function TldrawEditorWithOwnStore(
defaultName,
snapshot,
assets,
migrations,
})

return <TldrawEditorWithLoadingStore {...props} store={syncedStore} user={user} />
Expand Down

0 comments on commit ed9c077

Please sign in to comment.