Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit c6c2afa

Browse files
committed
Adding optional chaining
1 parent eebbd0d commit c6c2afa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/atoms/Table/Table.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default function Table({id, head, body, foot, caption, className}) {
3434
tag="th"
3535
key={index}
3636
className={
37-
cell.align !== ''
37+
cell?.align !== ''
3838
? `text-${cell.align}`
3939
: 'text-left'
4040
}
@@ -59,7 +59,7 @@ export default function Table({id, head, body, foot, caption, className}) {
5959
tag="td"
6060
key={index}
6161
className={
62-
cell.align !== ''
62+
cell?.align !== ''
6363
? `text-${cell.align}`
6464
: 'text-left'
6565
}
@@ -85,7 +85,7 @@ export default function Table({id, head, body, foot, caption, className}) {
8585
tag="td"
8686
key={index}
8787
className={
88-
cell.align !== ''
88+
cell?.align !== ''
8989
? `text-${cell.align}`
9090
: 'text-left'
9191
}

0 commit comments

Comments
 (0)