Skip to content

Commit d8a6968

Browse files
author
Maksym Mykhailenko
committed
fix: profile phone error
1 parent 9f87975 commit d8a6968

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/helpers/utils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,13 @@ export const caseInsensitiveSearch = (key, searchString) => {
135135
* if phone is not head with '+', add '+'
136136
*
137137
* @param {String} phone
138-
* @returns {String}
138+
* @returns {String}
139139
*/
140140
export const formatPhone = (phone) => {
141+
if (!phone) {
142+
return phone
143+
}
144+
141145
if(phone[0] === '+') {
142146
return phone
143147
}else{

0 commit comments

Comments
 (0)