CSR-1454: minor tweak to avoid returning empty strings which were creating extra empty markup

This commit is contained in:
Adam Caouette 2023-07-05 10:32:35 -04:00
parent 4938e65379
commit a05951b7ce

View file

@ -296,7 +296,7 @@ export function doesCopyContainTextLink(copy) {
* @returns array of strings
*/
export function splitCopyOnCMSPlaceHolder(copy) {
return copy.split(/{(.*?)}/g);
return copy.split(/{(.*?)}/g).filter(str => str.length > 0);
}
/**