fixing intemittent undefined errors
This commit is contained in:
@@ -148,7 +148,7 @@ const Owning: React.FC = () => {
|
||||
const fetchOwnerRentals = async () => {
|
||||
try {
|
||||
const response = await rentalAPI.getListings();
|
||||
setOwnerRentals(response.data);
|
||||
setOwnerRentals(response.data || []);
|
||||
} catch (err: any) {
|
||||
console.error("Failed to fetch owner rentals:", err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user