diff --git a/README.md b/README.md index 86620de0..a804697f 100644 --- a/README.md +++ b/README.md @@ -144,3 +144,4 @@ Yjs is licensed under the [MIT License](./LICENSE.txt). [ShareJs]: https://github.com/share/ShareJS [OpenCoweb]: https://github.com/opencoweb/coweb/wiki + diff --git a/dist b/dist index 8ba1e4ce..ab6a193e 160000 --- a/dist +++ b/dist @@ -1 +1 @@ -Subproject commit 8ba1e4ce27a75bb025a5478723ea57f7f437ccf0 +Subproject commit ab6a193ec6ec799bdb77fa23eeec1f05d5b910d6 diff --git a/src/Connector.js b/src/Connector.js index 0a1bb4e1..bc55ccf2 100644 --- a/src/Connector.js +++ b/src/Connector.js @@ -63,8 +63,12 @@ module.exports = function (Y/* :any */) { return this.y.db.stopGarbageCollector() } setUserId (userId) { - this.userId = userId - return this.y.db.setUserId(userId) + if (this.userId == null) { + this.userId = userId + return this.y.db.setUserId(userId) + } else { + return null + } } onUserEvent (f) { this.userEventListeners.push(f)