Show actual error path/key in YAML card editor (#8076)

This commit is contained in:
Philip Allgaier 2021-01-04 09:58:07 +01:00 committed by GitHub
parent 775e93d54b
commit 293b56cfa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ export const handleStructError = (err: Error): string[] => {
for (const failure of err.failures()) {
if (failure.type === "never") {
errors.push(
`Key "${failure.path[0]}" is not supported by the UI editor.`
`Key "${failure.path.join(".")}" is not supported by the UI editor.`
);
} else {
errors.push(