Skip to content

Commit 37d1a78

Browse files
update yjs comment
1 parent 77505e2 commit 37d1a78

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

demos/yjs-react-supabase-text-collab/src/library/powersync/PowerSyncYjsProvider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ export class PowerSyncYjsProvider extends ObservableV2<PowerSyncYjsEvents> {
7272
* Local document updates get stored to the database and synced.
7373
*
7474
* These updates here originate from syncing remote updates.
75-
* Applying these updates to YJS should not result in the `storeUpdate`
76-
* handler creating a new `document_update` record. We mark the origin
75+
* Applying these updates to YJS should not result in the `_storeUpdate`
76+
* handler creating a new `document_update` record since we mark the `origin`
77+
* here and check the `origin` in `_storeUpdate`.
7778
*/
7879
Y.applyUpdateV2(doc, b64ToUint8Array(added.update_b64), origin);
7980
}

0 commit comments

Comments
 (0)