Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c67428d715 | ||
|
|
45a9af96af | ||
|
|
249c4f9c45 | ||
|
|
cdc7d3ffe6 | ||
|
|
ac6a0e7667 | ||
|
|
7a1d648e79 |
@@ -698,7 +698,7 @@ Y.applyUpdate(ydoc2, state1)
|
|||||||
This example shows how to sync two clients with the minimal amount of exchanged
|
This example shows how to sync two clients with the minimal amount of exchanged
|
||||||
data by computing only the differences using the state vector of the remote
|
data by computing only the differences using the state vector of the remote
|
||||||
client. Syncing clients using the state vector requires another roundtrip, but
|
client. Syncing clients using the state vector requires another roundtrip, but
|
||||||
can safe a lot of bandwidth.
|
can save a lot of bandwidth.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const stateVector1 = Y.encodeStateVector(ydoc1)
|
const stateVector1 = Y.encodeStateVector(ydoc1)
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.5.3",
|
"version": "13.5.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.5.3",
|
"version": "13.5.4",
|
||||||
"description": "Shared Editing Library",
|
"description": "Shared Editing Library",
|
||||||
"main": "./dist/yjs.cjs",
|
"main": "./dist/yjs.cjs",
|
||||||
"module": "./dist/yjs.mjs",
|
"module": "./dist/yjs.mjs",
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export class YXmlTreeWalker {
|
|||||||
* @type {Item|null}
|
* @type {Item|null}
|
||||||
*/
|
*/
|
||||||
let n = this._currentNode
|
let n = this._currentNode
|
||||||
let type = /** @type {any} */ (n.content).type
|
let type = n && n.content && /** @type {any} */ (n.content).type
|
||||||
if (n !== null && (!this._firstCall || n.deleted || !this._filter(type))) { // if first call, we check if we can use the first item
|
if (n !== null && (!this._firstCall || n.deleted || !this._filter(type))) { // if first call, we check if we can use the first item
|
||||||
do {
|
do {
|
||||||
type = /** @type {any} */ (n.content).type
|
type = /** @type {any} */ (n.content).type
|
||||||
|
|||||||
Reference in New Issue
Block a user