Skip to content

Commit

Permalink
[BOOKINGSG-4616][WK] safe check listItemRef if it exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilker0725 committed Aug 24, 2023
1 parent 8ead890 commit 0931c61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/nested-dropdown-list/nested-dropdown-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const NestedDropdownList = <V1, V2, V3>({
searchInputRef.current.focus();
} else if (listItemRefs.current) {
const target = keyPaths[focusedIndex];
listItemRefs.current[target[0]].ref.focus();
listItemRefs.current[target[0]]?.ref.focus();
}

if (multiSelect) {
Expand Down

0 comments on commit 0931c61

Please sign in to comment.