diff --git a/src/Component/BlazorComponent.Web/src/components/scroll-to-target/index.ts b/src/Component/BlazorComponent.Web/src/components/scroll-to-target/index.ts index ad3348a36..79c8d13be 100644 --- a/src/Component/BlazorComponent.Web/src/components/scroll-to-target/index.ts +++ b/src/Component/BlazorComponent.Web/src/components/scroll-to-target/index.ts @@ -15,7 +15,10 @@ class ScrollToTargetJSInterop { observe(id: string) { const el = document.getElementById(id); - if (!el) return; + if (!el) { + console.warn(`[ScrollToTarget] Element with id '${id}' not found`); + return; + } const observer = new IntersectionObserver( async (