mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-10-04 14:50:17 +02:00
generate username on portal init instead of collab mount
This commit is contained in:
@@ -110,10 +110,6 @@ class CollabWrapper extends PureComponent<Props, CollabState> {
|
||||
window.addEventListener(EVENT.BEFORE_UNLOAD, this.beforeUnload);
|
||||
window.addEventListener(EVENT.UNLOAD, this.onUnload);
|
||||
|
||||
if (!this.state.username) {
|
||||
this.updateUsername(getRandomUsername());
|
||||
}
|
||||
|
||||
if (
|
||||
process.env.NODE_ENV === ENV.TEST ||
|
||||
process.env.NODE_ENV === ENV.DEVELOPMENT
|
||||
@@ -228,6 +224,10 @@ class CollabWrapper extends PureComponent<Props, CollabState> {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!this.state.username) {
|
||||
this.updateUsername(getRandomUsername());
|
||||
}
|
||||
|
||||
let roomId;
|
||||
let roomKey;
|
||||
|
||||
|
Reference in New Issue
Block a user