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: reset unmounted state for the component #4682

Merged
merged 2 commits into from
Feb 1, 2022

Conversation

rulikrulit
Copy link
Contributor

When Excalidraw is used as a dynamic component with useEffects it gets unmounted and mounted back multiple times. componentWillUnmount sets this.unmounted to true which breaks the functionality because it blocks syncActionResult. This fix ensures that this.unmounted is reseted to false

@vercel
Copy link

vercel bot commented Jan 31, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/excalidraw/excalidraw/Gde2jBD6hx4w4H8zFvMo4nDbhjPH
✅ Preview: https://excalidraw-git-fork-rulikrulit-bug-remounted-328540-excalidraw.vercel.app

@vjeux
Copy link
Contributor

vjeux commented Jan 31, 2022

cc @ad1992 as it related to the embed component.

@rulikrulit rulikrulit changed the title Reset unmounted state for the component fix: reset unmounted state for the component Jan 31, 2022
@ad1992
Copy link
Member

ad1992 commented Feb 1, 2022

@rulikrulit since this is related to the package, can you also update changelog under Fixes ?

@ad1992
Copy link
Member

ad1992 commented Feb 1, 2022

merging 🎉, thanks @rulikrulit for fixing this!

@ad1992 ad1992 merged commit 719ae7b into excalidraw:master Feb 1, 2022
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.

None yet

3 participants