generate username on portal init instead of collab mount
This commit is contained in:
parent
146c510faa
commit
88691b1c3c
@ -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…
x
Reference in New Issue
Block a user