From 5ce57caa2c4a0afcde476dac8da2422a3fcbd9d4 Mon Sep 17 00:00:00 2001 From: Yohann Gablowski Date: Wed, 25 Oct 2023 12:07:25 +0200 Subject: [PATCH] fix(Resultats): conditionnal label --- ui/src/campagnes/Components/ResultatsVisualisation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/campagnes/Components/ResultatsVisualisation.js b/ui/src/campagnes/Components/ResultatsVisualisation.js index f49bb92a..3b7be448 100644 --- a/ui/src/campagnes/Components/ResultatsVisualisation.js +++ b/ui/src/campagnes/Components/ResultatsVisualisation.js @@ -260,7 +260,7 @@ const multiEmojiOption = (responses) => { const removeHTMLTagRegex = /(<([^>]+)>)/gi; const questions = [ - ...new Set(responses.map((response) => response.label.replace(removeHTMLTagRegex, ""))), + ...new Set(responses.map((response) => response.label?.replace(removeHTMLTagRegex, ""))), ]; return {