diff --git a/src/entities.ts b/src/entities.ts index cf91ff2c..dcec6143 100644 --- a/src/entities.ts +++ b/src/entities.ts @@ -310,7 +310,7 @@ customEvents.on('gameLoaded', () => { }) bot.on('teamRemoved', (team: Team) => { - if (appViewer.playerState.reactive.team?.team === team.team) { + if (appViewer.playerState.reactive.team?.team === team?.team) { appViewer.playerState.reactive.team = undefined // Player's team was removed, need to update all entities that are in a team updateEntityNameTags(team) diff --git a/src/react/ChunksDebugScreen.tsx b/src/react/ChunksDebugScreen.tsx index 9f47d023..de33e454 100644 --- a/src/react/ChunksDebugScreen.tsx +++ b/src/react/ChunksDebugScreen.tsx @@ -30,7 +30,7 @@ const Inner = () => { state, lines: [String(chunk?.loads.length ?? 0)], sidebarLines: [ - `loads: ${chunk.loads?.map(l => `${l.reason} ${l.dataLength} ${l.time}`).join('\n')}`, + `loads: ${chunk?.loads?.map(l => `${l.reason} ${l.dataLength} ${l.time}`).join('\n')}`, // `blockUpdates: ${chunk.blockUpdates}`, ], }