From 29bf958cb956aa80cc29715407a422b7a9194cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Roche?= Date: Tue, 19 Mar 2024 18:49:40 +0100 Subject: [PATCH] fix link --- components/link/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/link/index.js b/components/link/index.js index c94c104..c535775 100644 --- a/components/link/index.js +++ b/components/link/index.js @@ -29,9 +29,9 @@ export const Link = forwardRef(function Link( { - if (isAnchor) { + if (isAnchor && lenis) { e.preventDefault() - lenis?.scrollTo(href) + lenis.scrollTo(href) } onClick?.(e) }}