ensure the form editor is ready before attempting to update example data w/ burnettk (#1639)

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
jasquat 2024-05-29 20:27:35 +00:00 committed by GitHub
parent 928273c034
commit 3de5fb34a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ export default function ReactFormBuilder({
// Auto save example data changes
useEffect(() => {
if (baseFileName !== '') {
if (baseFileName !== '' && ready) {
saveFile(new File([debouncedFormData], baseFileName + DATA_EXTENSION));
}
}, [debouncedFormData, baseFileName, saveFile, ready]);