Skip to content

Commit

Permalink
🏷️
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Dec 15, 2023
1 parent dc837d9 commit d8adf71
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/table/src/queries/getColSpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ import { TTableCellElement } from '../types';
* @default 1 if undefined.
*/
export const getColSpan = (cellElem: TTableCellElement) => {
const attrColSpan = Number(cellElem.attributes?.colspan);
return cellElem.colSpan || attrColSpan || 1;
return cellElem.colSpan || Number(cellElem.attributes?.colspan) || 1;
};
3 changes: 1 addition & 2 deletions packages/table/src/queries/getRowSpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ import { TTableCellElement } from '../types';
* @default 1 if undefined
*/
export const getRowSpan = (cellElem: TTableCellElement) => {
const attrRowSpan = Number(cellElem.attributes?.rowspan);
return cellElem.rowSpan || attrRowSpan || 1;
return cellElem.rowSpan || Number(cellElem.attributes?.rowspan) || 1;
};
2 changes: 1 addition & 1 deletion packages/table/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export interface TTableCellElement extends TElement {
*/
right?: BorderStyle;
};
attributes: {
attributes?: {
colspan?: string;
rowspan?: string;
};
Expand Down

0 comments on commit d8adf71

Please sign in to comment.