vendredi 10 février 2017

Assertion failed: you modified

I have two related models, an Order which contains several Payments.

Order also has a total property. Each Payment is a percentage of the total. Therefore, when total changes, each payment observes it and calculates its partial total.

My problem arises from the fact that Order has also an Ember.computed.sum of those totals, in case the percentages are not yet 100%.

Ember.js issues an "Assertion Failed: You modified computedTotal twice on <iec-jbe@component:order-form::ember906> in a single render. This was unreliable and slow in Ember 1.x and is no longer supported. See http://ift.tt/2aKLECc for more details.".

I understand why this happens, but I can't see a better way to do what I need to do. Can anyone help me here?




Aucun commentaire:

Enregistrer un commentaire