Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when sanitize changes initial input, value is modified twice in a single render #136

Closed
bgentry opened this issue Jan 2, 2017 · 1 comment

Comments

@bgentry
Copy link

bgentry commented Jan 2, 2017

I took the demo gist, updated it to use the release channel of ember, and changed the sanitizeInput function to just always return a fixed value (thus always changing the initial value to something else):

https://ember-twiddle.com/21941c09a4bb7ac7e8c03f174208806b?openFiles=components.one-way-input.js%2C

Because sanitizeInput is called on load (see #135), that causes the following error when the app first renders:

Assertion Failed: You modified currentValue twice on (generated application controller) in a single render. This was unreliable and slow in Ember 1.x and is no longer supported. See emberjs/ember.js#13948 for more details.

My understanding of Ember isn't strong enough to know how to fix this, though 😞

@bgentry bgentry changed the title when sanitize changes initial input, modified value twice in a single render when sanitize changes initial input, value is modified twice in a single render Jan 2, 2017
@ghost
Copy link

ghost commented Jan 5, 2017

Fixed by removing the action all together. Sanitize your inputs in the update action instead!

@ghost ghost closed this as completed Jan 5, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant