Fix object is possibly undefined error
This commit is contained in:
parent
852108c4c6
commit
90dcb54bba
1 changed files with 2 additions and 2 deletions
|
|
@ -66,8 +66,8 @@ const CharacterGrid = (props: Props) => {
|
|||
// Initialize an array of current uncap values for each characters
|
||||
useEffect(() => {
|
||||
let initialPreviousUncapValues: { [key: number]: number } = {}
|
||||
Object.values(appState.grid.characters).map(
|
||||
(o) => (initialPreviousUncapValues[o.position] = o.uncap_level)
|
||||
Object.values(appState.grid.characters).map((o) =>
|
||||
o ? (initialPreviousUncapValues[o.position] = o.uncap_level) : null
|
||||
)
|
||||
setPreviousUncapValues(initialPreviousUncapValues)
|
||||
}, [appState.grid.characters])
|
||||
|
|
|
|||
Loading…
Reference in a new issue