Skip to content

Commit

Permalink
move the displayFirst check into th first condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzipi-kaltura committed Oct 10, 2024
1 parent 97c2abb commit 0a1b97e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/download-item/download-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ export const DownloadItem = withText({
const downloadItemRef = useRef<HTMLDivElement>(null);

useEffect(() => {
if (isDefault) {
downloadItemRef.current?.focus();
} else if (displayFirst) {
if (isDefault || displayFirst) {
downloadItemRef.current?.focus();
}
}, []);
Expand Down

0 comments on commit 0a1b97e

Please sign in to comment.