Fix formatting util in case of shape being rendered
This commit is contained in:
parent
6e31b71474
commit
a20105b0d2
|
|
@ -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 />');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue