mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-18 21:36:27 +01:00
fixes #177
This commit is contained in:
parent
87d16f355c
commit
777bc066af
@ -1,4 +1,4 @@
|
||||
import { RoomEngineObjectEvent, RoomObjectCategory } from '@nitrots/nitro-renderer';
|
||||
import { RoomEngineObjectEvent, RoomObjectCategory, RoomObjectType } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useReducer, useState } from 'react';
|
||||
import { GetRoomSession } from '../../api';
|
||||
import { Base, Button, DraggableWindowPosition, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../common';
|
||||
@ -52,7 +52,7 @@ export const ModToolsView: FC<{}> = props =>
|
||||
|
||||
const userData = roomSession.userDataManager.getUserDataByIndex(event.objectId);
|
||||
|
||||
if(!userData) return;
|
||||
if(!userData || userData.type !== RoomObjectType.USER) return;
|
||||
|
||||
setSelectedUser({ userId: userData.webID, username: userData.name });
|
||||
}, []);
|
||||
|
Loading…
Reference in New Issue
Block a user