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

safer dispose of placeholder #151646

Merged
merged 1 commit into from
Jun 10, 2022
Merged

safer dispose of placeholder #151646

merged 1 commit into from
Jun 10, 2022

Conversation

meganrogge
Copy link
Contributor

This PR fixes #151641

if (this._placeholderDecoration) {
this._placeholderDecoration.marker.dispose();
this._placeholderDecoration.dispose();
this._placeholderDecoration = undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

line 123 was getting reached when _placeholderDecoration had already gotten set to undefined via the onDispose below

@meganrogge meganrogge requested a review from Tyriar June 9, 2022 21:02
@meganrogge meganrogge self-assigned this Jun 9, 2022
@meganrogge meganrogge modified the milestones: July 2022, June 2022 Jun 9, 2022
@meganrogge meganrogge merged commit 160855d into main Jun 10, 2022
@meganrogge meganrogge deleted the merogge/clearPlaceholder branch June 10, 2022 00:15
@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot read properties of undefined, reading 'dispose'
2 participants