From e60d2fe98a519b1a95a47685521de33fc9872429 Mon Sep 17 00:00:00 2001 From: simoncolincap <66997279+simoncolincap@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:40:45 +0000 Subject: [PATCH] FIX room.friendly_id undefined on room page (#8) --- 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() {