Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Don't pass destroyed TextEditors to find-and-replace #2105

Merged
merged 7 commits into from
Apr 30, 2019

Conversation

smashwilson
Copy link
Contributor

Please be sure to read the contributor's guide to the GitHub package before submitting any pull requests.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • Suggestion: You can use checklists to keep track of progress for the sections on metrics, tests, documentation, and user research.

Description of the Change

Within items that embed TextEditors (ChangedFileItem, CommitDetailItem, CommitPreviewItem, and IssueishDetailItem), avoid triggering the observeEmbeddedTextEditor callback used by find-and-replace with TextEditors that have already been destroyed.

Screenshot

N/A

Alternate Designs

N/A

Benefits

Fixes a stack trace.

Possible Drawbacks

N/A

Applicable Issues

Fixes #2073.

Metrics

N/A

Tests

Augmented existing test suite to cover destroyed-editor cases.

Documentation

N/A

Release Notes

N/A

User Experience Research (Optional)

N/A

@smashwilson smashwilson self-assigned this Apr 29, 2019
@codecov
Copy link

codecov bot commented Apr 29, 2019

Codecov Report

Merging #2105 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2105      +/-   ##
==========================================
+ Coverage   92.55%   92.55%   +<.01%     
==========================================
  Files         207      207              
  Lines       12021    12025       +4     
  Branches     1746     1754       +8     
==========================================
+ Hits        11126    11130       +4     
  Misses        895      895
Impacted Files Coverage Δ
lib/items/commit-preview-item.js 100% <100%> (ø) ⬆️
lib/items/commit-detail-item.js 100% <100%> (ø) ⬆️
lib/items/issueish-detail-item.js 98.38% <100%> (+0.02%) ⬆️
lib/items/changed-file-item.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ef8aac...bd6fe2c. Read the comment docs.

Copy link
Contributor

@kuychaco kuychaco left a comment

Choose a reason for hiding this comment

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

Nice fix and cleanup ✨

@smashwilson smashwilson merged commit e93cd81 into master Apr 30, 2019
@smashwilson smashwilson deleted the aw/destroyed-marker-layers branch April 30, 2019 13:18
smashwilson added a commit that referenced this pull request May 8, 2019
Don't pass destroyed TextEditors to find-and-replace
This was referenced May 8, 2019
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.

Uncaught Error: Cannot decorate a destroyed marker layer
2 participants