Skip to content

Commit

Permalink
fixing the cumulative shift of carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
amankumarrr committed Oct 18, 2024
1 parent cb258d7 commit 371b409
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/blocks/carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Carousel = ({ data }) => {
const router = useRouter();
const isMobile = useIsMobile();

if (!data.showOnMobileDevices && isMobile) {
if (!data.showOnMobileDevices && isMobile && typeof window !== "undefined") {
return null;
}

Expand Down

0 comments on commit 371b409

Please sign in to comment.