Skip to content

Commit 0d66745

Browse files
Fix open parenthesis on user saved trips
1 parent e1cb80f commit 0d66745

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/components/form/user-settings-i18n.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ function stripAllButNameOfAddress(string) {
1616

1717
// If string contains any letters, split the string!
1818
if (/[a-zA-Z]/g.test(string)) {
19-
return string.split(',')[0]
19+
let newString = string.split(',')[0]
20+
// If there is an open parenthesis without a close (user saved place), add one.
21+
if (newString.includes('(') && !newString.includes(')')) {
22+
newString = newString + ')'
23+
}
24+
return newString
2025
}
2126
return string
2227
}

0 commit comments

Comments
 (0)