|
@@ -380,6 +380,13 @@ class Collab extends PureComponent<Props, CollabState> {
|
|
|
startCollaboration = async (
|
|
|
existingRoomLinkData: null | { roomId: string; roomKey: string },
|
|
|
): Promise<ImportedDataState | null> => {
|
|
|
+ if (!this.state.username) {
|
|
|
+ import("@excalidraw/random-username").then(({ getRandomUsername }) => {
|
|
|
+ const username = getRandomUsername();
|
|
|
+ this.onUsernameChange(username);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
if (this.portal.socket) {
|
|
|
return null;
|
|
|
}
|