In the password and profile directives, the user's fields are fetched from an OPTIONS request.
|
scope.fields = response.data.actions.PUT; |
|
scope.fields = response.data.actions.PUT; |
If an api doesn't respond to the request with data like below, a TypeError is thrown. A simple fix is to not try to access actions.PUT when actions is undefined.
{
"data": {
"actions": {
"PUT": /* user fields */
}
...
}
}
In the password and profile directives, the user's fields are fetched from an OPTIONS request.
angular-user-management/src/password/scripts/directives.js
Line 91 in ff7410a
angular-user-management/src/profile/scripts/directives.js
Line 24 in ff7410a
If an api doesn't respond to the request with data like below, a TypeError is thrown. A simple fix is to not try to access
actions.PUTwhenactionsis undefined.