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(module:code-editor): dispose the event listener when the component is destroyed #6847

Merged
merged 1 commit into from
Jul 12, 2021

Conversation

arturovt
Copy link
Member

PR Checklist

PR Type

[x] Bugfix

What is the current behavior?

Monaco's models are stored independently from the editor instance (inside the ModelService). So they also have to be disposed separately.

What is the new behavior?

The event listener is disposed when the component is destroyed.

Does this PR introduce a breaking change?

[x] No

@arturovt arturovt requested a review from wzhudev as a code owner July 12, 2021 10:18
@zorro-bot
Copy link

zorro-bot bot commented Jul 12, 2021

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Jul 12, 2021

Codecov Report

Merging #6847 (782b61b) into master (6d43b6c) will decrease coverage by 0.01%.
The diff coverage is 12.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6847      +/-   ##
==========================================
- Coverage   89.52%   89.50%   -0.02%     
==========================================
  Files         489      489              
  Lines       15799    15805       +6     
  Branches     2427     2428       +1     
==========================================
+ Hits        14144    14147       +3     
- Misses       1012     1016       +4     
+ Partials      643      642       -1     
Impacted Files Coverage Δ
components/code-editor/code-editor.component.ts 14.75% <12.50%> (+0.09%) ⬆️
components/tabs/tab-nav-bar.component.ts 83.03% <0.00%> (+0.70%) ⬆️

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 6d43b6c...782b61b. Read the comment docs.

Copy link
Member

@hsuanxyz hsuanxyz left a comment

Choose a reason for hiding this comment

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

LGTM

@hsuanxyz hsuanxyz merged commit 503c6f9 into NG-ZORRO:master Jul 12, 2021
@arturovt arturovt deleted the fix/editor-dispose-model branch July 12, 2021 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants