From 449191e48cb036a852645f337b4a92798784194d Mon Sep 17 00:00:00 2001 From: LionelB Date: Mon, 18 Jan 2021 13:48:57 +0100 Subject: [PATCH] fix(frontend): remove source in cc if there no legifrance url --- .../pages/convention-collective/[slug].js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/code-du-travail-frontend/pages/convention-collective/[slug].js b/packages/code-du-travail-frontend/pages/convention-collective/[slug].js index 5f5a15f98b..b7b30e04cf 100644 --- a/packages/code-du-travail-frontend/pages/convention-collective/[slug].js +++ b/packages/code-du-travail-frontend/pages/convention-collective/[slug].js @@ -77,10 +77,12 @@ class ConventionCollective extends React.Component { "Droit du travail: Existe-t-il une hiérarchie entre les textes ?", }, ]} - source={{ - name: "Légifrance", - url: convention.url, - }} + source={ + convention.url && { + name: "Légifrance", + url: convention.url, + } + } subtitle={ {convention.title} (IDCC {formatIdcc(convention.num)})