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: calling setMode just before destroy causes error reading getLength #5685

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nlujjawal
Copy link
Contributor

Issue #, if available:
#5681

Description of changes:
When the editor is destroyed the pending callback(due to some async network request) created with editor.getSession.setMode causes an error which is avoided by aborting the callback in case if editor is destroyed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Pull Request Checklist:

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.01%. Comparing base (442680c) to head (bf4b461).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/edit_session.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5685      +/-   ##
==========================================
- Coverage   87.01%   87.01%   -0.01%     
==========================================
  Files         598      598              
  Lines       43683    43685       +2     
  Branches     7204     7205       +1     
==========================================
+ Hits        38012    38013       +1     
- Misses       5671     5672       +1     
Flag Coverage Δ
unittests 87.01% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@akoreman
Copy link
Contributor

Is there a way we can add an automated test for this? mainly to reduce the risk of regression here in the future.

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