Skip to content

Commit 2f6bbaf

Browse files
committed
fix: handle undefined selectionHelper in useItemSelectHelper
1 parent 3831723 commit 2f6bbaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/pluggableWidgets/gallery-web/src/helpers/useItemSelectHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export function useItemSelectHelper(
66
selectionHelper: SelectionHelper | undefined
77
): SelectActionHandler {
88
// eslint-disable-next-line react-hooks/exhaustive-deps
9-
return useMemo(() => new SelectActionHandler(selection, selectionHelper), [selectionHelper]);
9+
return useMemo(() => new SelectActionHandler(selection, selectionHelper ?? null), [selectionHelper]);
1010
}

0 commit comments

Comments
 (0)