[DetailPanel] youmaylike crash error fix

This commit is contained in:
고동영
2024-07-03 17:07:21 +09:00
parent 3cf0cc70cd
commit caf091fc8b

View File

@@ -288,8 +288,10 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
dispatch(getProductImageLength({ imageLength: imgUrls600.length }));
return;
}
const imgUrls600 = hotelInfos[selectedIndex]?.imgUrls600 || [];
dispatch(getProductImageLength({ imageLength: imgUrls600.length }));
if (type === "hotel") {
const imgUrls600 = hotelInfos[selectedIndex]?.imgUrls600 || [];
dispatch(getProductImageLength({ imageLength: imgUrls600.length }));
}
}
}, [dispatch, themeProductInfos, selectedIndex, hotelInfos]);