diff --git a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx index 94ced3e415..1f36eb58d3 100644 --- a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx +++ b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx @@ -221,7 +221,7 @@ export const Stepper = (stepperProps: StepperProps) => { useEffect(() => { const main = document.querySelector('main'); - if (main) { + if (main && typeof main.scrollTo === 'function') { main.scrollTo({ top: 0, behavior: 'auto' }); } }, [activeStep]);