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

React: fix editor cleanup #4973

Merged
merged 1 commit into from
Apr 6, 2024
Merged

Conversation

kfirmanty
Copy link
Contributor

@kfirmanty kfirmanty commented Mar 12, 2024

Please describe your changes

Hi! I noticed that editor.destroy() is not being called for each reference that is being created, this should fix the problem.

How did you accomplish your changes

Cleaning up editor was moved to the return of useEffect that creates a new editor, this way for each editor instantiated there will be a respective cleanup fn.

How have you tested your changes

How can we verify your changes

[add a detailed description of how we can verify your changes here]

Checklist

  • The changes are not breaking the editor
  • Added tests where possible
  • Followed the guidelines
  • Fixed linting issues

Copy link

netlify bot commented Mar 12, 2024

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit d6ad42f
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/660168b750d4990007c6b1da
😎 Deploy Preview https://deploy-preview-4973--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kfirmanty kfirmanty force-pushed the react-fix-editor-cleanup branch 2 times, most recently from bb4951d to 4249ee7 Compare March 13, 2024 16:05
@kfirmanty kfirmanty force-pushed the react-fix-editor-cleanup branch from 4249ee7 to d6ad42f Compare March 25, 2024 12:06
Copy link
Member

@bdbch bdbch left a comment

Choose a reason for hiding this comment

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

Thanks, lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants