Skip to content

Commit

Permalink
chore: clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Sep 10, 2024
1 parent 44291cf commit 02a18da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/components/connect-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ export function ConnectDialog({
<SelectItem value="liveblocks" disabled>
LiveblocksProvider (coming soon)
</SelectItem>
<SelectItem value="hocuspocus" disabled>
HocuspocusProvider (coming soon)
</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
Expand Down
4 changes: 2 additions & 2 deletions src/state/ydoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function connectStatusIndicator(yDoc: Y.Doc, set: Setter) {
});

yDoc.on("subdocs", ({ added }) => {
for (const doc of added) {
doc.on("beforeTransaction", (tr) => {
for (const subDoc of added) {
subDoc.on("beforeTransaction", (tr) => {
const origin = tr.origin;
if (origin === null || origin instanceof Y.UndoManager) {
set(uploadAtom, (prev) => prev + 1);
Expand Down

0 comments on commit 02a18da

Please sign in to comment.