Infinite loop in enyo.Model.commit

I've hooked the "change" event for my model to save it to the backend (after a configured delay to reduce unnecessary trips for multiple changes). The backend responds with an updatedAt property (and id if it's a new object) which gets merged into the model by enyo.Model.didCommit (via setObject). setObject then triggers the change event again and starts the process over.

I can work around this but seems like there should be native support for this model (meaning auto-saving a model on change).

Thoughts?

Comments

Sign In or Register to comment.