From 777bc066afb27f6d5f5d1ebea6eb365454db1f13 Mon Sep 17 00:00:00 2001 From: dank074 Date: Fri, 25 Mar 2022 16:52:42 -0500 Subject: [PATCH] fixes #177 --- src/components/mod-tools/ModToolsView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/mod-tools/ModToolsView.tsx b/src/components/mod-tools/ModToolsView.tsx index f88f4ed1..a7b3c173 100644 --- a/src/components/mod-tools/ModToolsView.tsx +++ b/src/components/mod-tools/ModToolsView.tsx @@ -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 }); }, []);