Skip to content

Commit 2d8ae27

Browse files
committed
fix(useSort): null pointer if nothing is passed
1 parent 85a0040 commit 2d8ae27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/sort/useSort.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const useSort = <T extends TableNode>(
9191
): Sort<T> => {
9292
const controlledState: State = {
9393
...DEFAULT_STATE,
94-
...(primary.state ?? {}),
94+
...(primary?.state ?? {}),
9595
};
9696

9797
const onChange = primary?.onChange ? primary.onChange : () => {};

0 commit comments

Comments
 (0)