Skip to content

TypeError when api doesn't respond to OPTIONS request with actions property #28

@henrahmagix

Description

@henrahmagix

In the password and profile directives, the user's fields are fetched from an OPTIONS request.

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 */
        }
        ...
    }
}

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