diff --git a/frontend/app/ui/room/setting-modal.tsx b/frontend/app/ui/room/setting-modal.tsx index b584e186..2c0a0ee6 100644 --- a/frontend/app/ui/room/setting-modal.tsx +++ b/frontend/app/ui/room/setting-modal.tsx @@ -49,13 +49,13 @@ export default function SettingModal({ throw new Error("not found room"); } let result; - if (room.accessLevel !== "PROTECTED" && e.password === "") { - result = await updateRoom(e.roomName, room.id, room.accessLevel); + if (e.selectedAccessLevel !== "PROTECTED") { + result = await updateRoom(e.roomName, room.id, e.selectedAccessLevel); } else { result = await updateRoom( e.roomName, room.id, - room.accessLevel, + e.selectedAccessLevel, e.password, ); }