From 24780eef58d0055d9a584cf3d1272ffd05855923 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 8 Nov 2016 19:15:11 -0500 Subject: [PATCH] Make sure to check for user before redirecting in update user Otherwise, the page redirects before the user is loaded --- static/js/pages/update-user.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/js/pages/update-user.js b/static/js/pages/update-user.js index 319f55760..b6ee6446d 100644 --- a/static/js/pages/update-user.js +++ b/static/js/pages/update-user.js @@ -12,6 +12,7 @@ $scope.state = 'loading'; UserService.updateUserIn($scope, function(user) { + if (!user.anonymous) { if (!user.prompts || !user.prompts.length) { $location.path('/'); return; @@ -19,6 +20,7 @@ $scope.state = 'editing'; $scope.username = user.username; + } }); var confirmUsername = function(username) {