mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
generate username on portal init instead of collab mount
This commit is contained in:
parent
146c510faa
commit
88691b1c3c
1 changed files with 4 additions and 4 deletions
|
@ -110,10 +110,6 @@ class CollabWrapper extends PureComponent<Props, CollabState> {
|
||||||
window.addEventListener(EVENT.BEFORE_UNLOAD, this.beforeUnload);
|
window.addEventListener(EVENT.BEFORE_UNLOAD, this.beforeUnload);
|
||||||
window.addEventListener(EVENT.UNLOAD, this.onUnload);
|
window.addEventListener(EVENT.UNLOAD, this.onUnload);
|
||||||
|
|
||||||
if (!this.state.username) {
|
|
||||||
this.updateUsername(getRandomUsername());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
process.env.NODE_ENV === ENV.TEST ||
|
process.env.NODE_ENV === ENV.TEST ||
|
||||||
process.env.NODE_ENV === ENV.DEVELOPMENT
|
process.env.NODE_ENV === ENV.DEVELOPMENT
|
||||||
|
@ -228,6 +224,10 @@ class CollabWrapper extends PureComponent<Props, CollabState> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.state.username) {
|
||||||
|
this.updateUsername(getRandomUsername());
|
||||||
|
}
|
||||||
|
|
||||||
let roomId;
|
let roomId;
|
||||||
let roomKey;
|
let roomKey;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue