-
Notifications
You must be signed in to change notification settings - Fork 109
Prevent dangling debounced extractHeadings function #3520
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
Conversation
juliusknorr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
Our Tiptap heading extension registers a debounced extractHeadings function for onUpdate. If the editor gets removed but a debounced extractHeadings call is still pending, this leads to errors (which sometimes break tests). So let's check whether the editor is still alive and only call debounced extractHeadings in this case. Signed-off-by: Jonas <[email protected]>
Signed-off-by: Jonas <[email protected]>
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
||||||||||||||||||||||||||||||||||
57a1fb4 to
3ba143d
Compare
|
/compile |
Signed-off-by: nextcloud-command <[email protected]>
|
I wonder if this also applies to the other debounced functions we have. But then that's a different step / fix i guess. |
|
/backport 72a1c48 to stable25 |
|
/backport 72a1c48 to stable25 |
📝 Summary
Our Tiptap heading extension registers a debounced extractHeadings function for onUpdate. If the editor gets removed but a debounced extractHeadings call is still pending, this leads to errors (which sometimes break tests).
So let's track whether the editor is still alive and only call debounced extractHeadings in this case.
🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)