fix: edit page crashing

This commit is contained in:
trafficlunar 2026-03-27 21:16:57 +00:00
parent a6b444fcea
commit c78f54824e
2 changed files with 2 additions and 4 deletions

View file

@ -21,8 +21,8 @@ export default function EyesTab({ instructions }: Props) {
const [tab, setTab] = useState(0);
const [colors, setColors] = useState<number[]>(() =>
TABS.map((t) => {
const entry = instructions.current.eyes[t.name];
const color = "color" in entry ? entry.color : null;
const entry = instructions.current.eyes[t.name] ?? {};
const color = entry && "color" in entry ? entry.color : null;
return color ?? 122;
}),
);