From 44efa3e490ab1591afbc7d9ca90cb7e10f1936f1 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 19 Nov 2022 18:57:21 -0800 Subject: [PATCH] Revert "Try to fix object error" This reverts commit c39b66bce251bb4a71adc5d8401d74c91c904ec2. --- components/CharacterGrid/index.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/CharacterGrid/index.tsx b/components/CharacterGrid/index.tsx index 44928993..18329974 100644 --- a/components/CharacterGrid/index.tsx +++ b/components/CharacterGrid/index.tsx @@ -231,9 +231,7 @@ const CharacterGrid = (props: Props) => { ) const updateUncapLevel = (position: number, uncapLevel: number) => { - if (grid.characters[position]) { - appState.grid.characters[position]!.uncap_level = uncapLevel - } + appState.grid.characters[position].uncap_level = uncapLevel } function storePreviousUncapValue(position: number) { @@ -241,8 +239,7 @@ const CharacterGrid = (props: Props) => { let newPreviousValues = { ...previousUncapValues } if (grid.characters[position]) { - const character = grid.characters[position] - newPreviousValues[position] = character ? character.uncap_level : -1 + newPreviousValues[position] = grid.characters[position].uncap_level setPreviousUncapValues(newPreviousValues) } }