Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/components/form/user-settings-i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ function stripAllButNameOfAddress(string) {

// If string contains any letters, split the string!
if (/[a-zA-Z]/g.test(string)) {
return string.split(',')[0]
let newString = string.split(',')[0]
// If there is an open parenthesis without a close (user saved place), add one.
if (newString.includes('(') && !newString.includes(')')) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this string? Coffee (Starbucks (Market & 20th)? I think you may need to actually count the open and close parentheses 🙃 I knew this leetcode problem would come in handy one day!!

newString = newString + ')'
}
return newString
}
return string
}
Expand Down
Loading