Skip to content

restangularizeElement sets parentResource when first argument is null #871

@aaronpeterson

Description

@aaronpeterson

It appears that restangularizeElement() is erroneously setting the parentResource to the new record created that is returned by my service in the then() callback argument. On POST "creation" of a resource at my endpoint, my service returns a fully hydrated json record of the object. However, even though this restangularized Element was created with "null" as the first argument (no parent resource), further examination reveals that the object passed to the then() callback erroneously has parentResource set as well as a nulled "route" property. This was unexpected, however I have not yet reviewed the Restangular source in this area.

I love Restangular and it's been a blast to work with. Awesome work and my compliments to the contributors. I hope to contribute in the near future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions