From 8a938d6d1b537eac3401d047199e3d5e99fb9357 Mon Sep 17 00:00:00 2001 From: "Nadler, Sebastian" Date: Fri, 17 May 2024 07:38:59 +0000 Subject: [PATCH] FIX room.friendly_id undefined on room page --- app/javascript/components/rooms/room/forms/ShareRoomForm.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/components/rooms/room/forms/ShareRoomForm.jsx b/app/javascript/components/rooms/room/forms/ShareRoomForm.jsx index bfe94dd1f5..2bf37972eb 100644 --- a/app/javascript/components/rooms/room/forms/ShareRoomForm.jsx +++ b/app/javascript/components/rooms/room/forms/ShareRoomForm.jsx @@ -31,7 +31,9 @@ export default function ShareRoomForm({ room }) { const currentUser = useAuth(); function roomJoinUrl() { - return `${window.location}/${room.friendly_id}/join`; + if (room.friendly_id !== undefined) + return `${window.location}/${room.friendly_id}/join`; + return `${window.location}/join`; } function copyInvite() {