Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -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 { | ... | ... |
-
Please register or login to post a comment