fix: use item name as key for equipped items list
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m4s
CI / Lint, Build & Test (pull_request) Successful in 1m8s

item.type only has three possible values (weapon/armour/trinket).
Using it as a React key is safe in practice because the equipment system
enforces one item per slot, but item.name is a stable, semantically
correct unique identifier that does not rely on that invariant.
This commit is contained in:
2026-03-09 22:12:42 -07:00
committed by Naomi Carrigan
parent 0dc572c6fa
commit 2c16736bdf
@@ -243,7 +243,7 @@ const CharacterPage = ({ discordId }: CharacterPageProperties): JSX.Element => {
return ( return (
<div <div
className="character-page-equipment-item" className="character-page-equipment-item"
key={item.type} key={item.name}
> >
<div className="character-page-equipment-header"> <div className="character-page-equipment-header">
<span className="character-page-equipment-slot"> <span className="character-page-equipment-slot">