Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit ff19449

Browse files
Fix: Handle undefined data in RegulatoryInformationDetails
The error "Cannot read properties of undefined (reading 'filter')" indicates that the `filter` method is being called on an undefined variable within the `RegulatoryInformationDetails` component. This likely occurs when data expected to be an array is not available. To resolve this, the code will be updated to safely access and filter the data, ensuring that it handles cases where the data might be undefined or null. This will prevent the runtime error and ensure the component renders correctly.
1 parent 896fb1a commit ff19449

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/product/RegulatoryInformationDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const RegulatoryInformationDetails = ({ product }: RegulatoryInformationProps) =
100100
<div>
101101
<p className="text-sm font-medium">AI Technology:</p>
102102
<p className="text-gray-500 text-sm">
103-
This product utilizes {product.features.filter(f =>
103+
This product utilizes {product.features?.filter(f =>
104104
f.toLowerCase().includes('deep learning') ||
105105
f.toLowerCase().includes('ai') ||
106106
f.toLowerCase().includes('artificial intelligence')

0 commit comments

Comments
 (0)