mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 14:44:15 +00:00
fix: edit page crashing
This commit is contained in:
parent
a6b444fcea
commit
c78f54824e
2 changed files with 2 additions and 4 deletions
|
|
@ -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;
|
||||
}),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue