Skip to content

Blank account update form #17

@yaskyj

Description

@yaskyj

It flashes the form fields for a second and then is blank between "Update your profile here:" and "Actions" headings. Here's the console error:
TypeError: Cannot read property 'toLowerCase' of undefined
at http://www.freecodecamp.com/assets/main-f8954d61b57a2ddb3277b1552c0c3545.js:49:72
at http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:81:132
at http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:112:276
at l.$eval (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:126:84)
at l.$digest (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:123:195)
at l.$apply (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:126:362)
at l (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:81:422)
at O (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:86:51)
at XMLHttpRequest.w.onload (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js:87:78)

That looks like it's on the $scope.user.profile.username.toLowerCase() on line 49. The JSON from my /account/api doesn't have a user.profile.username key.
Maybe it would be a simple fix of piping?
$scope.user.profile.username = $scope.user.profile.username.toLowerCase() || '';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions