Skip to content

Commit acfc69b

Browse files
committed
[tests] 100% coverage
1 parent a07000b commit acfc69b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/common/array.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ export const arrayJoin = (array: string[], sep = EMPTY_STRING) =>
4141
array.join(sep);
4242

4343
export const arrayMap = <Value, Return>(
44-
array: Value[] | undefined,
44+
array: Value[],
4545
cb: (value: Value, index: number, array: Value[]) => Return,
46-
): Return[] => array?.map(cb) ?? [];
46+
): Return[] => array.map(cb);
4747

4848
export const arraySum = (array: number[]): number =>
4949
arrayReduce<number, number>(array, (i, j) => i + j, 0);

src/ui-react-dom/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ const useCells = (
266266
const extraKey = (index: number, after: 0 | 1) => (after ? '>' : '<') + index;
267267

268268
const extraHeaders = (
269-
extraCells: (ExtraRowCell | ExtraValueCell)[] | undefined,
269+
extraCells: (ExtraRowCell | ExtraValueCell)[] = [],
270270
after: 0 | 1 = 0,
271271
) =>
272272
arrayMap(extraCells, ({label}, index) => (
@@ -276,7 +276,7 @@ const extraHeaders = (
276276
));
277277

278278
const extraRowCells = (
279-
extraRowCells: ExtraRowCell[] | undefined,
279+
extraRowCells: ExtraRowCell[] = [],
280280
extraRowCellProps: RowProps,
281281
after: 0 | 1 = 0,
282282
) =>
@@ -287,7 +287,7 @@ const extraRowCells = (
287287
));
288288

289289
const extraValueCells = (
290-
extraValueCells: ExtraValueCell[] | undefined,
290+
extraValueCells: ExtraValueCell[] = [],
291291
extraValueCellProps: ValueProps,
292292
after: 0 | 1 = 0,
293293
) =>

0 commit comments

Comments
 (0)