From b90f3221aadf046d48fc5f8d8920701aedc0a589 Mon Sep 17 00:00:00 2001 From: Lucas Holmquist Date: Mon, 9 Jun 2014 12:17:39 -0400 Subject: [PATCH] Update user model logic for Ember Inspector. Fixes #2921. --- core/client/models/user.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/client/models/user.js b/core/client/models/user.js index 656d462814..5b1893fab2 100644 --- a/core/client/models/user.js +++ b/core/client/models/user.js @@ -41,11 +41,9 @@ var User = DS.Model.extend({ validationErrors.push({message: 'Location is too long'}); } - if (this.get('website').length) { - if (!validator.isURL(this.get('website'), { protocols: ['http', 'https'], require_protocol: true }) || - !validator.isLength(this.get('website'), 0, 2000)) { - validationErrors.push({message: 'Please use a valid url'}); - } + if (!validator.isURL(this.get('website'), { protocols: ['http', 'https'], require_protocol: true }) || + !validator.isLength(this.get('website'), 0, 2000)) { + validationErrors.push({message: 'Please use a valid url'}); } return validationErrors;