Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiri111enz committed Jan 30, 2024
1 parent ae48b2c commit d2db61f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/includer/traverse/tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,8 @@ export function prepareTableRowData(
};
}

const returnType =
(inner.ref?.length || inner.type.split('\n').length || 0) <= 1
? `${inner.type}[]`
: `(${inner.type})[]`;
const isUnionType = (inner.ref?.length || inner.type.split('\n').length || 0) > 1;
const returnType = isUnionType ? `(${inner.type})[]` : `${inner.type}[]`;

return {
type: returnType,
Expand Down

0 comments on commit d2db61f

Please sign in to comment.