mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 15:17:43 -05:00
fix crash when removing ability in build modal
This commit is contained in:
@@ -220,7 +220,7 @@ const BuildCard: React.FC<BuildCardProps & BoxProps> = ({
|
||||
<Box>
|
||||
<Box>
|
||||
{build.modes.map((mode) => (
|
||||
<Box as="span" mr={1}>
|
||||
<Box key={mode} as="span" mr={1}>
|
||||
<ModeImage mode={mode} size={24} />
|
||||
</Box>
|
||||
))}
|
||||
|
||||
@@ -196,9 +196,9 @@ const BuildModal: React.FC<Props> = ({ onClose, build }) => {
|
||||
shoesAbilities: onShoesChange,
|
||||
};
|
||||
|
||||
const newAbilityArray = {
|
||||
const newAbilityArray = [
|
||||
...abilityArrays[gear],
|
||||
};
|
||||
];
|
||||
|
||||
newAbilityArray[index] = "UNKNOWN";
|
||||
onChange[gear](newAbilityArray);
|
||||
|
||||
Reference in New Issue
Block a user