fixing intemittent undefined errors

This commit is contained in:
jackiettran
2025-12-30 18:07:23 -05:00
parent e3acf45ba0
commit 3e31b9d08b
6 changed files with 6 additions and 6 deletions

View File

@@ -74,7 +74,7 @@ const Renting: React.FC = () => {
const fetchRentals = async () => {
try {
const response = await rentalAPI.getRentals();
setRentals(response.data);
setRentals(response.data || []);
} catch (err: any) {
setError(err.response?.data?.message || "Failed to fetch rentals");
} finally {