Skip to content

Commit

Permalink
add Error for developers
Browse files Browse the repository at this point in the history
  • Loading branch information
levil664 committed Sep 5, 2023
1 parent c8de695 commit a51f919
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/schools/domains/common/components/table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export const Table = <RowType, DataItemType>(props: CustomTableProps<RowType, Da

let baseColumns: any[]

if (customWidths && customWidths.length !== columnsTitlesAndKeys.length) {
throw new Error('Длина customWidths должна соответствовать длине columnsTitlesAndKeys.');
}

if (!customWidths) {
baseColumns = columnsTitlesAndKeys.map(([title, key]) => ({
dataIndex: key,
Expand Down

0 comments on commit a51f919

Please sign in to comment.