Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
yihong0618 committed May 1, 2023
1 parent 3b4cc3b commit d106c6a
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,6 @@ const locationForRun = (run) => {
if (location) {
// Only for Chinese now
// should fiter 臺灣
if(location.indexOf('臺灣') > -1){
const taiwan = '台湾';
location = location.replace('臺灣', taiwan);
const _locArr = location.split(',').map(item=>item.trim());
const _locArrLen = _locArr.length;
// directly repalce last item with 中国
_locArr[_locArrLen-1] = '中国';
// if location not contain '台湾省', insert it before zip code(posistion is _locArrLen-2)
if(_locArr.indexOf(`${taiwan}省`) === -1){
_locArr.splice(_locArrLen-2, 0, `${taiwan}省`)
}
location = _locArr.join(',');
}
const cityMatch = location.match(/[\u4e00-\u9fa5]{2,}(|)/);
const provinceMatch = location.match(/[\u4e00-\u9fa5]{2,}(|)/);
if (cityMatch) {
Expand Down

0 comments on commit d106c6a

Please sign in to comment.