diff --git a/README.md b/README.md index 86620de0ed82b6b659b6eb99815e6a40d53970ca..a804697fb592e356f1bac3f7e88bc59286c89cff 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 8ba1e4ce27a75bb025a5478723ea57f7f437ccf0..ab6a193ec6ec799bdb77fa23eeec1f05d5b910d6 160000 --- a/dist +++ b/dist @@ -1 +1 @@ -Subproject commit 8ba1e4ce27a75bb025a5478723ea57f7f437ccf0 +Subproject commit ab6a193ec6ec799bdb77fa23eeec1f05d5b910d6 diff --git a/src/Connector.js b/src/Connector.js index 0a1bb4e1c053bdc12b20ddc3ce3fe00d02a0b4cd..bc55ccf2c323f6139642a2bcdfa8ae3f9a47643b 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)