From 38f3121abe93f090cdcc50eb80e1f808e7eec805 Mon Sep 17 00:00:00 2001 From: Brian Rourke Boll Date: Sat, 25 May 2024 11:23:56 -0400 Subject: [PATCH] Only scroll if we have something to scroll to --- docs/content/fsdocs-theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/fsdocs-theme.js b/docs/content/fsdocs-theme.js index 88576ec5..3cea8682 100644 --- a/docs/content/fsdocs-theme.js +++ b/docs/content/fsdocs-theme.js @@ -17,7 +17,7 @@ function scrollToAndExpandSelectedMember() { const details = document.querySelector(`tr > td.fsdocs-member-usage:has(a[href='${location.hash}']) ~ td.fsdocs-member-xmldoc > details`); details?.setAttribute('open', 'true'); const header = document.querySelector(`a[href='${location.hash}']`); - header.scrollIntoView({ behavior: 'instant'}); + header?.scrollIntoView({ behavior: 'instant'}); } }