Skip to content

Commit 4f323a3

Browse files
authored
fix(ui): issue with checking for undefined json when autosave and validate is enabled (#7678)
1 parent f5e7578 commit 4f323a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ui/src/elements/Autosave/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const Autosave: React.FC<Props> = ({
155155
}
156156
})
157157
.then((json) => {
158-
if (versionsConfig?.drafts && versionsConfig?.drafts?.validate && json.errors) {
158+
if (versionsConfig?.drafts && versionsConfig?.drafts?.validate && json?.errors) {
159159
if (Array.isArray(json.errors)) {
160160
const [fieldErrors, nonFieldErrors] = json.errors.reduce(
161161
([fieldErrs, nonFieldErrs], err) => {

0 commit comments

Comments
 (0)