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

fix: error thrown because didCreateEditor is called too early #171

Closed
wants to merge 1 commit into from
Closed

fix: error thrown because didCreateEditor is called too early #171

wants to merge 1 commit into from

Conversation

rpemberton
Copy link

Overview
The didCreateEditor lifecycle hook is being called in willRender. This is throwing an EmberError when the editor provided by didCreateEditor is used elsewhere.

Reproduction
Link: https://ember-twiddle.com/4ba3fad7bcc64119fcfb324f8bf770ac
Open console to see error message.

Assertion Failed: You modified "editor" twice on <twiddle@controller:application::ember177> in a single render. It was rendered in "template:twiddle/templates/application" and modified in "component:mobiledoc-editor". This was unreliable and slow in Ember 1.x and is no longer supported. See emberjs/ember.js#13948 for more details.

Solution
Move the didCreateEditor call to didInsertElement

@rpemberton rpemberton closed this Aug 18, 2022
@rpemberton
Copy link
Author

Closed due to inactivity

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

Successfully merging this pull request may close these issues.

None yet

1 participant