adopted-ember-addons / validated-changeset

Buffering changes to form data
MIT License
36 stars 27 forks source link

Bugfix: validate on render without backtracking Ember assertion #133

Closed snewcomer closed 3 years ago

snewcomer commented 3 years ago

This PR only ensures that on validate we only ever read from an untracked errors cache before writing to a tracked property. While ERRORS (_errors) is not write only yet (ideal state so that tracked properties are only ever written but never read from. This ensure no read-then-write issues in Ember), this PR does ensure validate() can be called on render in Ember. Moreover, ensuring we only write to CHANGES is a much more involved effort. This PR does not attempt to fix.

ref https://github.com/poteto/ember-changeset/issues/602