Skip to content

Commit

Permalink
chore: clean errors object
Browse files Browse the repository at this point in the history
  • Loading branch information
Acidiney Dias committed Jul 17, 2024
1 parent b806875 commit c86bf52
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/node_dto.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,9 @@ export class NodeDto {
}
}

if (withErrors.filter((f) => Object.keys(f).length).length) {
return { success: false, errors: withErrors };
const errors = withErrors.filter((f) => Object.keys(f).length)
if (errors.length) {
return { success: false, errors };
}

return {
Expand Down

0 comments on commit c86bf52

Please sign in to comment.