Remove address part if translation matches <.*>

This commit is contained in:
Bryan Housel
2017-04-22 12:03:37 -04:00
parent a5554cf3b0
commit 0782ee10c8

View File

@@ -94,8 +94,12 @@ export function localize(obj) {
val = obj.tags && obj.tags[tag],
str = t(key, { default: val });
if (str && str.match(/^<.*>$/) === null) {
obj.tags[tag] = str;
if (str) {
if (str.match(/^<.*>$/) !== null) {
delete obj.tags[tag];
} else {
obj.tags[tag] = str;
}
}
});
}