Closed Mati365 closed 1 month ago
Totals | |
---|---|
Change from base Build 99f1a8b3-7db2-4b7a-b3cb-6130df28e2ca: | 0.0% |
Covered Lines: | 582 |
Relevant Lines: | 582 |
@f1ames I don't think so, simulating this is too difficult, and it's that kind of behavior that often changes with React implementation changes.
Suggested merge commit message (convention)
Fix: Prevent potential crashes of
useMultiRootEditor
during the initialization phase when setting the new state of the multi-root editor with an attached watchdog. Closes https://github.com/ckeditor/ckeditor5-react/issues/542Additional information
It appears that some of our tests are causing random restarts of the editor. An example of such a restart might occur when setting some data while the component has not fully rendered the entire CKEditor, and the semaphore begins destroying it while running in the watchdog context.
This PR resets the reinitialized editor data to the one defined in the React state (data is defined in the upper scope). This change seems to make our tests more stable and should be harmless.