Skip to content

Commit 2ebe17a

Browse files
fix: fix unsafe optional chaining lint
1 parent 594a3b4 commit 2ebe17a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/taxonomy/tag-list/tagColumns.test.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ const getActionsColumn = (overrides = {}) => {
2626
describe('tagColumns', () => {
2727
it('disables create, edit, and delete actions when tag actions are disabled', () => {
2828
const actionsColumn = getActionsColumn({ disableTagActions: true });
29-
const headerElement = (actionsColumn?.header as any)();
30-
const cellElement = (actionsColumn?.cell as any)({
29+
30+
if (!actionsColumn) {
31+
throw new Error('Actions column not found');
32+
}
33+
34+
const headerElement = (actionsColumn.header as any)();
35+
const cellElement = (actionsColumn.cell as any)({
3136
row: {
3237
depth: 0,
3338
original: {

0 commit comments

Comments
 (0)