mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) no method find on undefined planCategories
This commit is contained in:
parent
18e82c0151
commit
00d841e2c6
@ -121,7 +121,7 @@ export const PlansList: React.FC<PlansListProps> = ({ onError, onPlanSelection,
|
||||
* When called with a category ID, returns the requested plan-category
|
||||
*/
|
||||
const findCategory = (categoryId: number): PlanCategory => {
|
||||
return planCategories.find(c => c.id === categoryId);
|
||||
return planCategories?.find(c => c.id === categoryId);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user