Skip to content

Commit

Permalink
fix(web): extract errors, use ref to identify errors
Browse files Browse the repository at this point in the history
* type was causing it to miss errors for notify.*.type
  • Loading branch information
JosephKav committed Apr 8, 2024
1 parent 49c132c commit bb676ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/ui/react-app/src/utils/errors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export const extractErrors = (
const fullPath = `${prefix}${prefix ? `.${key}` : key}`;
const atPath = fullPath.startsWith(path); // if the path is in the key
if (atPath || path.includes(fullPath)) {
if (typeof value === "object" && !value.hasOwnProperty("type"))
if (typeof value === "object" && !value.hasOwnProperty("ref"))
traverse(fullPath, value);
else if (atPath && value?.hasOwnProperty("type")) {
else if (atPath && value?.hasOwnProperty("ref")) {
const trimmedPath = path
? fullPath.substring(path.length + 1)
: fullPath;
Expand Down

0 comments on commit bb676ca

Please sign in to comment.