Skip to content

Commit

Permalink
[nan-1763] succinctness
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Bonnin <233326+TBonnin@users.noreply.github.com>
  • Loading branch information
khaliqgant and TBonnin authored Sep 27, 2024
1 parent 52ba3f0 commit b583d37
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions integrations/xero/mappers/to-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ export function toXeroItem(item: Item) {
}

export function toFailedItem(xeroItem: XeroItem): FailedItem {
const failedItem = toItem(xeroItem);
const failedItemWithValidationErrors: FailedItem = {
...failedItem,
validation_errors: xeroItem?.ValidationErrors || []
};
return failedItemWithValidationErrors;
return {
...(toItem(xeroItem))
validation_errors: xeroItem?.ValidationErrors || []
}
}

0 comments on commit b583d37

Please sign in to comment.