Overnap

방에서 나간 유저가 제대로 삭제되지 않던 문제 수정

...@@ -34,7 +34,7 @@ export const Room: React.FC = () => { ...@@ -34,7 +34,7 @@ export const Room: React.FC = () => {
34 const data = rawMessage.message as UpdateRoomUser; 34 const data = rawMessage.message as UpdateRoomUser;
35 if (data.state == 'removed') { 35 if (data.state == 'removed') {
36 const newUsers = roomData.users; 36 const newUsers = roomData.users;
37 - const index = newUsers.indexOf(data.user); 37 + const index = newUsers.findIndex(x => x.username === data.user.username);
38 if (index < 0) { 38 if (index < 0) {
39 console.log('존재하지 않는 유저를 제거 시도'); 39 console.log('존재하지 않는 유저를 제거 시도');
40 } else { 40 } else {
......