Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
eunjae-lee committed Jan 2, 2025
1 parent 1658624 commit c766694
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/features/data-table/components/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export function DataTable<TData, TValue>({
enableColumnResizing,
...rest
}: DataTableProps<TData, TValue> & React.ComponentPropsWithoutRef<"div">) {
const pathname = usePathname();
const identifier = _identifier ?? pathname;
const pathname = usePathname() as string | null;
const identifier = _identifier ?? pathname ?? undefined;

const { rows } = table.getRowModel();

Expand Down Expand Up @@ -78,8 +78,7 @@ export function DataTable<TData, TValue>({
enabled: Boolean(enableColumnResizing),
table,
tableContainerRef,
// TODO: Figure out why 'identifier' somehow types to string | null
identifier: identifier || undefined,
identifier,
});

return (
Expand Down

0 comments on commit c766694

Please sign in to comment.