formio / formio.js

JavaScript powered Forms with JSON Form Builder
https://formio.github.io/formio.js
MIT License
1.83k stars 1.04k forks source link

FIO-8493: Added null check for this.root in builder mode #5647

Closed roma-formio closed 2 weeks ago

roma-formio commented 2 weeks ago

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-8493

Description

This PR addresses an issue in the 4.x versions of formio.js where this.root is undefined when the edit button of the form component is clicked in builder mode. This issue does not occur in the master branch, as it was resolved by this commit

The fix involves adding additional null checks to the root of the form component to prevent errors when this.root is undefined. This ensures that the builder mode operates as expected across all versions of the library.

How has this PR been tested?

This fix has been tested by cherry-picking the commit onto the 4.19.x branch

Checklist: