From 01e7b2a6a9901edcefe5e45c80c4eec4e685fe67 Mon Sep 17 00:00:00 2001 From: omuretsu <84951833+Snarling@users.noreply.github.com> Date: Mon, 12 Jun 2023 01:13:25 -0400 Subject: [PATCH] Fix possible crash on invalid aug name Fixes error from #591 --- src/Augmentation/ui/PurchasableAugmentations.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Augmentation/ui/PurchasableAugmentations.tsx b/src/Augmentation/ui/PurchasableAugmentations.tsx index 9ae8fd998..8eae47392 100644 --- a/src/Augmentation/ui/PurchasableAugmentations.tsx +++ b/src/Augmentation/ui/PurchasableAugmentations.tsx @@ -164,6 +164,7 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac const [open, setOpen] = useState(false); const aug = StaticAugmentations[props.augName]; + if (!aug) return <>; const augCosts = aug.getCost(); const cost = props.parent.sleeveAugs ? aug.baseCost : augCosts.moneyCost; const repCost = augCosts.repCost;