Fix formatting util in case of shape being rendered

This commit is contained in:
Sipke Schoorstra 2023-06-18 22:06:31 +02:00
parent 6e31b71474
commit a20105b0d2

View file

@ -128,6 +128,9 @@ export function generateIdentity() {
return uuid().replace(/-/g, '');
}
export function formatTextWithLineBreaks(text: string) {
export function formatTextWithLineBreaks(text: any) {
if(typeof(text) != 'string')
return text;
return text?.replace(/\n/g, '<br />');
}