Merge pull request #2098 from coreos-inc/fix-update-user
Make sure to check for user before redirecting in update user
This commit is contained in:
commit
4853a26308
1 changed files with 2 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
||||||
$scope.state = 'loading';
|
$scope.state = 'loading';
|
||||||
|
|
||||||
UserService.updateUserIn($scope, function(user) {
|
UserService.updateUserIn($scope, function(user) {
|
||||||
|
if (!user.anonymous) {
|
||||||
if (!user.prompts || !user.prompts.length) {
|
if (!user.prompts || !user.prompts.length) {
|
||||||
$location.path('/');
|
$location.path('/');
|
||||||
return;
|
return;
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
|
|
||||||
$scope.state = 'editing';
|
$scope.state = 'editing';
|
||||||
$scope.username = user.username;
|
$scope.username = user.username;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var confirmUsername = function(username) {
|
var confirmUsername = function(username) {
|
||||||
|
|
Reference in a new issue