From 0782ee10c87375800e521c968de67927c63c7f03 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sat, 22 Apr 2017 12:03:37 -0400 Subject: [PATCH] Remove address part if translation matches <.*> --- modules/ui/intro/helper.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/ui/intro/helper.js b/modules/ui/intro/helper.js index fae2ffd92..9d42df2c4 100644 --- a/modules/ui/intro/helper.js +++ b/modules/ui/intro/helper.js @@ -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; + } } }); }