Skip to content

Conversation

@LucianBuzzo
Copy link
Contributor

If the terminal's parent element is removed from the DOM and the .fit() method is called, an error is thrown.
This PR introduces guard logic that checks if the parent exists.


exports.proposeGeometry = function (term) {
if (!term.element.parentElement) {
return false;
Copy link
Member

Choose a reason for hiding this comment

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

I think null would be more fitting here, other than that looks good

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing, I'll update the PR.

@Tyriar Tyriar added this to the 2.4.0 milestone Feb 13, 2017
@Tyriar Tyriar merged commit fddc13d into xtermjs:master Feb 13, 2017
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.

2 participants