canvu-react 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/realtime.cjs +11 -0
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.js +11 -0
- package/dist/realtime.js.map +1 -1
- package/package.json +1 -1
package/dist/realtime.js
CHANGED
|
@@ -2482,6 +2482,17 @@ function useRealtimeSession(options) {
|
|
|
2482
2482
|
}
|
|
2483
2483
|
const board = boardRef.current;
|
|
2484
2484
|
if (board) {
|
|
2485
|
+
if (!options2?.replace) {
|
|
2486
|
+
const pendingLocal = pendingLocalItemsRef.current;
|
|
2487
|
+
if (pendingLocal) {
|
|
2488
|
+
pendingLocalItemsRef.current = null;
|
|
2489
|
+
applyLocalItemsToYDoc(board, {
|
|
2490
|
+
items: pendingLocal,
|
|
2491
|
+
origin: ORIGIN_LOCAL
|
|
2492
|
+
});
|
|
2493
|
+
queuedDirtyRef.current = true;
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2485
2496
|
if (options2?.replace) {
|
|
2486
2497
|
replaceYDocWithSnapshot(board, {
|
|
2487
2498
|
items: snapshot.items,
|