Répare le crash lorsque le pathId n'est pas défini

fix #1874
pull/1884/head
Johan Girod 2021-12-15 09:38:24 +01:00
parent 0520b0bf7a
commit 153d668d16
2 changed files with 12 additions and 8 deletions

View File

@ -56,14 +56,17 @@ export const SimulatorHits = connectHits(({ hits }: SimulatorHitsProps) => {
</H3>
)}
<Grid container spacing={2}>
{hits.map((hit) => (
<Grid item key={hit.objectID} xs={12} lg={6}>
<SimulateurCardHit
hit={hit}
path={path(hit.pathId.split('.'), sitePaths)}
/>
</Grid>
))}
{hits.map(
(hit) =>
hit.pathId && (
<Grid item key={hit.objectID} xs={12} lg={6}>
<SimulateurCardHit
hit={hit}
path={path(hit.pathId.split('.'), sitePaths)}
/>
</Grid>
)
)}
</Grid>
</>
)

View File

@ -608,6 +608,7 @@ module.exports = ({ t = (_, text) => text } = {}) => {
icône: '🎩',
tracking: 'dividendes',
iframePath: 'dividendes',
pathId: 'simulateurs.dividendes',
meta: {
title: t('pages.simulateurs.dividendes.meta.title', 'Dividendes'),
description: t(