From 7136f2eff3bf8b037cc2fe484c561b511951a145 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Mon, 12 Jan 2015 11:48:36 -0800 Subject: [PATCH] fix angular issue that was preventing load of accounts page --- public/js/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index ed6ed60d75..d3e56ed6bf 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -46,11 +46,11 @@ profileValidation.controller('profileValidationController', ['$scope', '$http', function($scope, $http) { $http.get('/account/api').success(function(data) { $scope.user = data.user; - $scope.user.profile.username = $scope.user.profile.username.toLowerCase(); + $scope.user.profile.username = $scope.user.profile.username ? $scope.user.profile.username.toLowerCase() : undefined; $scope.storedUsername = data.user.profile.username; $scope.storedEmail = data.user.email; - $scope.user.email = $scope.user.email.toLowerCase(); - $scope.user.profile.twitterHandle = $scope.user.profile.twitterHandle.toLowerCase(); + $scope.user.email = $scope.user.email ? $scope.user.email.toLowerCase() : undefined; + $scope.user.profile.twitterHandle = $scope.user.profile.twitterHandle ? $scope.user.profile.twitterHandle.toLowerCase() : undefined; $scope.asyncComplete = true; }); }