From 851affa288e2472eb303d8a222ca61acbe2858c4 Mon Sep 17 00:00:00 2001 From: Coatezy <2954283+coatezy@users.noreply.github.com> Date: Wed, 9 Oct 2024 19:46:39 +0100 Subject: [PATCH] fix: undefined tags in field when editing --- app/javascript/js/controllers/fields/tags_field_helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/js/controllers/fields/tags_field_helpers.js b/app/javascript/js/controllers/fields/tags_field_helpers.js index f170acda44..c1242cfc9f 100644 --- a/app/javascript/js/controllers/fields/tags_field_helpers.js +++ b/app/javascript/js/controllers/fields/tags_field_helpers.js @@ -5,9 +5,9 @@ export function tagTemplate(tagData) { // eslint-disable-next-line eqeqeq (item) => item.value == tagData.value, ) - const possibleLabel = possibleSuggestion + const possibleLabel = possibleSuggestion.label ? possibleSuggestion.label - : tagData.value + : tagData.value; return `