1
0
Fork 0

chore(lab): Changes for pattern data

This commit is contained in:
Joost De Cock 2022-09-01 08:48:10 +02:00
parent d6cc541da3
commit 13e32d9ed9
10 changed files with 18 additions and 18 deletions

View file

@ -57,8 +57,8 @@ const TextSpans = ({ point, className='', style={}, onClick=null }) => {
let text = []
// Handle translation
let translated = ''
for (let string of point.attributes.getAsArray('data-text')) {
translated += t(string.toString()).replace(/"/g, '"') + ' '
for (const string of point.attributes.getAsArray('data-text')) {
if (string) translated += t(string.toString()).replace(/"/g, '"') + ' '
}
// Handle muti-line text
if (translated.indexOf('\n') !== -1) {