From 4e793995a0c965224e65f87e7a11dc23709f887a Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 16 Apr 2015 19:32:29 -0400 Subject: [PATCH] dont add http:// to website if its empty --- src/user/profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/profile.js b/src/user/profile.js index 4961c1d13d..448cabc6a9 100644 --- a/src/user/profile.js +++ b/src/user/profile.js @@ -121,7 +121,7 @@ module.exports = function(User) { } else if (field === 'signature') { data[field] = S(data[field]).stripTags().s; } else if (field === 'website') { - if (!data[field].startsWith('http://') && !data[field].startsWith('https://')) { + if (data[field] && !data[field].startsWith('http://') && !data[field].startsWith('https://')) { data[field] = 'http://' + data[field]; } }