bugfix racecondition in adding field to ui in parallel

This commit is contained in:
Timur Ercan
2023-03-19 11:17:04 +01:00
parent 071398273a
commit 266ecf0f8d
2 changed files with 3 additions and 3 deletions

View File

@@ -96,7 +96,7 @@ export default function PDFEditor(props: any) {
);
createOrUpdateField(props?.document, signatureField).then((res) => {
setFields(fields.concat(res));
setFields((prevState) => [...prevState, res]);
});
}
}