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.cjs
CHANGED
|
@@ -2507,6 +2507,17 @@ function useRealtimeSession(options) {
|
|
|
2507
2507
|
}
|
|
2508
2508
|
const board = boardRef.current;
|
|
2509
2509
|
if (board) {
|
|
2510
|
+
if (!options2?.replace) {
|
|
2511
|
+
const pendingLocal = pendingLocalItemsRef.current;
|
|
2512
|
+
if (pendingLocal) {
|
|
2513
|
+
pendingLocalItemsRef.current = null;
|
|
2514
|
+
applyLocalItemsToYDoc(board, {
|
|
2515
|
+
items: pendingLocal,
|
|
2516
|
+
origin: ORIGIN_LOCAL
|
|
2517
|
+
});
|
|
2518
|
+
queuedDirtyRef.current = true;
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2510
2521
|
if (options2?.replace) {
|
|
2511
2522
|
replaceYDocWithSnapshot(board, {
|
|
2512
2523
|
items: snapshot.items,
|