From 9b4637659eee45beda625f2ecc97ae96ce187004 Mon Sep 17 00:00:00 2001 From: Eitan Elbaz Date: Tue, 27 Jun 2023 18:00:47 +0100 Subject: [PATCH 1/3] remove console log --- src/ReactGrandTour.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ReactGrandTour.tsx b/src/ReactGrandTour.tsx index 7e398ea..b1e6e07 100644 --- a/src/ReactGrandTour.tsx +++ b/src/ReactGrandTour.tsx @@ -176,7 +176,6 @@ const ReactGrandTour: React.FC = ({ }; }, [onKeyUp]); - console.log(steps[currentIndex]); return ( Date: Tue, 27 Jun 2023 18:01:39 +0100 Subject: [PATCH 2/3] conditionally call scroll into view --- src/components/Step/Step.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Step/Step.tsx b/src/components/Step/Step.tsx index d82cc43..639a144 100644 --- a/src/components/Step/Step.tsx +++ b/src/components/Step/Step.tsx @@ -64,7 +64,7 @@ const Step = React.memo( setAnchorBoundaries((anchorElement ?? element).getBoundingClientRect()); }, [element, anchorElement]); const scrollToElement = useCallback(() => { - element.scrollIntoView(scrollIntoViewOptions); + element?.scrollIntoView?.(scrollIntoViewOptions); adjustBoundaries(); }, [adjustBoundaries, element, scrollIntoViewOptions]); useEffect(() => { From d60a67c0a353321fb07d4bcab13f05922c8e1d31 Mon Sep 17 00:00:00 2001 From: Eitan Elbaz Date: Tue, 27 Jun 2023 18:03:46 +0100 Subject: [PATCH 3/3] version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5f30a93..ee68723 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-grand-tour", - "version": "0.11.0", + "version": "0.11.1", "description": "", "main": "./dist/main.cjs.js", "module": "./dist/main.es.js",