fix: éviter un crash si la transcription est vide
This commit is contained in:
@@ -28,7 +28,7 @@ export async function generateMetadata(props) {
|
|||||||
|
|
||||||
const awtis = anTeks?.artistes?.length === 1 ? anTeks?.artistes[0].alias : getAlias(anTeks.artistes, anTeks.prioriteArtistes)
|
const awtis = anTeks?.artistes?.length === 1 ? anTeks?.artistes[0].alias : getAlias(anTeks.artistes, anTeks.prioriteArtistes)
|
||||||
const title = `PAWÒL-NU | ${awtis} - ${anTeks.titre}`
|
const title = `PAWÒL-NU | ${awtis} - ${anTeks.titre}`
|
||||||
const description = `Paroles de « ${anTeks?.titre} » : ${anTeks?.transcription.slice(0, 100)}...`
|
const description = `Paroles de « ${anTeks?.titre} » : ${anTeks?.transcription?.slice(0, 100) ?? ''}...`
|
||||||
const url = `${siteUrl}/paroles/${slug}`
|
const url = `${siteUrl}/paroles/${slug}`
|
||||||
|
|
||||||
const {couverture} = anTeks
|
const {couverture} = anTeks
|
||||||
|
|||||||
Reference in New Issue
Block a user