Skip to content

Commit

Permalink
fix(core): not all errors have dataPath
Browse files Browse the repository at this point in the history
  • Loading branch information
soup-in-boots committed Nov 5, 2022
1 parent c686eac commit d234497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/components/schema-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export function SchemaForm({
if (!valid) {
for (const error of errors) {
const keys = ObjectPath.parse(
error.dataPath.replace(/^\./, '')
error.dataPath?.replace(/^\./, '') ?? ''
);
const normal = ObjectPath.stringify(keys);
errorMap = { ...errorMap, [normal]: error.message };
Expand Down

0 comments on commit d234497

Please sign in to comment.