Skip to content

Commit

Permalink
fix: do not crash when headerIdWidths is undefined (TanStack#2754)
Browse files Browse the repository at this point in the history
  • Loading branch information
FezVrasta authored Oct 3, 2020
1 parent 179f80c commit fc8eb99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin-hooks/useResizeColumns.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function reducer(state, action) {

if (action.type === actions.columnResizing) {
const { clientX } = action
const { startX, columnWidth, headerIdWidths } = state.columnResizing
const { startX, columnWidth, headerIdWidths = [] } = state.columnResizing

const deltaX = clientX - startX
const percentageDeltaX = deltaX / columnWidth
Expand Down

0 comments on commit fc8eb99

Please sign in to comment.