deblockt / hal-rest-client

Typescript HAL Rest client
Apache License 2.0
25 stars 11 forks source link

reset item can broke some code when the returned object from the server is incomplete #40

Closed deblockt closed 5 years ago

deblockt commented 5 years ago

I have tried with 0.5.0 version and everything works fine. Thank you.

But also I've faced another thing:

Fetch parent resource and show it in ui. Fetch child resouce which has parent as embedded staying on the same ui. Errors in browser like "Cannot read property 'somename' of undefined" for parent. As I understand, on fetching child resource parent is reseted. And than created with key-value pairs from new server response. But in embedded object there are less parent properties, than we recieved previously from fetching parent. And as we use parent resource for our ui directly, the problem occure.

Could you suggest something?