Commit 52727cd6a3
Unsigned
Layout: unified · split
web/src/components/things/PrivacyPolicyDetails.astro +2 −2
| @@ -11,7 +11,7 @@ interface Props { | |||
| 11 | 11 | ||
| 12 | const { privacyData } = Astro.props; | 12 | const { privacyData } = Astro.props; |
| 13 | 13 | ||
| 14 | const priv = privacyData.parameters; | 14 | const priv = privacyData?.parameters; |
| 15 | 15 | ||
| 16 | const getIconName = (clasification: string) => { | 16 | const getIconName = (clasification: string) => { |
| 17 | if (clasification === 'good') return 'faceGood'; | 17 | if (clasification === 'good') return 'faceGood'; |
| @@ -23,7 +23,7 @@ const getIconName = (clasification: string) => { | |||
| 23 | // If two or more objects in privacyPolicy.points have the same title, remove the duplicates | 23 | // If two or more objects in privacyPolicy.points have the same title, remove the duplicates |
| 24 | const removeDuplicates = () => { | 24 | const removeDuplicates = () => { |
| 25 | const seen = new Set(); | 25 | const seen = new Set(); |
| 26 | return priv.points = priv.points.filter((point) => { | 26 | return priv.points = (priv.points || []).filter((point) => { |
| 27 | if (seen.has(point.title)) { | 27 | if (seen.has(point.title)) { |
| 28 | return false; | 28 | return false; |
| 29 | } | 29 | } |
web/src/pages/[...listing].astro +1 −1
| @@ -265,7 +265,7 @@ const makeSoftwareSchema = () => { | |||
| 265 | privacyPolicyLink={privacyPolicyLink} | 265 | privacyPolicyLink={privacyPolicyLink} |
| 266 | /> | 266 | /> |
| 267 | { | 267 | { |
| 268 | privacyData && privacyData.parameters.points.length > 0 && ( | 268 | privacyData && privacyData.parameters?.points?.length > 0 && ( |
| 269 | <section> | 269 | <section> |
| 270 | <h2>{name} Privacy Policy</h2> | 270 | <h2>{name} Privacy Policy</h2> |
| 271 | <PrivacyPolicyDetails privacyData={privacyData} /> | 271 | <PrivacyPolicyDetails privacyData={privacyData} /> |