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

[BUGFIX lts] Ensure errors in deferred component hooks can be recovered. #16245

Merged
merged 1 commit into from
Feb 14, 2018

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Feb 14, 2018

Previously, any errors thrown during didInsertElement would leave the running environment in an invalid state (env.inTransaction would be true but this._transaction would have been nullified).

This commit ensures that we always reset inTransaction if Environment.prototype.commit is called. Thus avoiding an error RE: "calling commit on null"...

Previously, any errors thrown during `didInsertElement` would leave the
running environment in an invalid state (`env.inTransaction` would be
`true` but `this._transaction` would have been nullified).

This commit ensures that we _always_ reset `inTransaction` if
`Environment.prototype.commit` is called. Thus avoiding an error RE:
"calling commit on null"...
Copy link

@kyleshay kyleshay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@rwjblue rwjblue merged commit a4229ad into emberjs:master Feb 14, 2018
@rwjblue rwjblue deleted the more-error-recovery branch February 14, 2018 20:34
@krisselden
Copy link
Contributor

we should reserve this as last resort for internal errors

@krisselden
Copy link
Contributor

Safe invoke user hooks

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.

3 participants