From 02cece07e5ea0d097c863ea108801be4ad815933 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 7 May 2024 09:46:20 +0200 Subject: [PATCH] use default also when it doesn't contain a "##" (#29308) fixes: #29263 Signed-off-by: Erik Jan de Wit --- .../admin-ui/src/components/multi-line-input/MultiLineInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/apps/admin-ui/src/components/multi-line-input/MultiLineInput.tsx b/js/apps/admin-ui/src/components/multi-line-input/MultiLineInput.tsx index 3fdee9c91c..5ff9e7d271 100644 --- a/js/apps/admin-ui/src/components/multi-line-input/MultiLineInput.tsx +++ b/js/apps/admin-ui/src/components/multi-line-input/MultiLineInput.tsx @@ -12,7 +12,7 @@ import { useFormContext, useWatch } from "react-hook-form"; import { useTranslation } from "react-i18next"; function stringToMultiline(value?: string): string[] { - return typeof value === "string" ? value.split("##") : [""]; + return typeof value === "string" ? value.split("##") : [value || ""]; } function toStringValue(formValue: string[]): string {