Skip to content

Commit

Permalink
docs: tldraw cleanup naming
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Oct 14, 2023
1 parent f1831a8 commit eb77a16
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ export function useYjsSecSyncStore({
logging: "debug",
});

const unsubs: (() => void)[] = [];
const subscribers: (() => void)[] = [];

function handleSync() {
unsubs.push(
subscribers.push(
store.listen(
function syncStoreChangesToYjsDoc({ changes }) {
yDocRef.current.transact(() => {
Expand Down Expand Up @@ -120,7 +120,7 @@ export function useYjsSecSyncStore({
};

yStore.on("change", handleChange);
unsubs.push(() => yStore.off("change", handleChange));
subscribers.push(() => yStore.off("change", handleChange));

// Fill the store with the Yjs doc content or if empty
// initialize the Yjs Doc with the default store records.
Expand Down

0 comments on commit eb77a16

Please sign in to comment.