Skip to content

Commit f007175

Browse files
authored
Clearing Issues and General Fixes (#592)
* Upgrade link fix * Fix on-page nav highlighting
1 parent 5fe0de4 commit f007175

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

src/components/Layout.jsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,28 +92,31 @@ function useTableOfContents(tableOfContents) {
9292
.flatMap((node) => [node.id, ...node.children.map((child) => child.id)])
9393
.map((id) => {
9494
let el = document.getElementById(id)
95-
if (!el) return
95+
if (!el) return null
9696

9797
let style = window.getComputedStyle(el)
9898
let scrollMt = parseFloat(style.scrollMarginTop)
9999

100100
let top = window.scrollY + el.getBoundingClientRect().top - scrollMt
101101
return { id, top }
102102
})
103+
.filter(Boolean)
103104
}, [])
104105

105106
useEffect(() => {
106107
if (tableOfContents.length === 0) return
107-
let headings = getHeadings(tableOfContents)
108108
function onScroll() {
109+
let headings = getHeadings(tableOfContents)
110+
if (headings.length === 0) return
111+
109112
let scrollTop = window.scrollY
110113
setShowJumpToTop(scrollTop > 400)
111-
112-
let top = scrollTop + 10;
113-
let current = headings[0]?.id
114+
115+
let top = scrollTop + 10
116+
let current = headings[0].id
114117
for (let heading of headings) {
115-
if (top >= heading?.top) {
116-
current = heading?.id
118+
if (top >= heading.top) {
119+
current = heading.id
117120
} else {
118121
break
119122
}

src/pages/selfhosted/maintenance/upgrade.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Management, Signal, and Relay are all part of the same repository and share the
4242

4343
To upgrade NetBird to the latest version:
4444

45-
1. Run the backup steps described in the [backup](#backup) section.
45+
1. Run the backup steps described in the [backup](/selfhosted/maintenance/backup) section.
4646
2. Review the release notes (see above) for any breaking changes.
4747
3. Pull the latest NetBird docker images:
4848
```bash
@@ -54,7 +54,7 @@ To upgrade NetBird to the latest version:
5454
```
5555

5656
<Note>
57-
For upgrades from older versions (pre-v0.26.0), see the [Legacy upgrade notes](#legacy-self-hosting-with-zitadel-idp).
57+
For upgrades from older versions (pre-v0.26.0), see the [Legacy upgrade notes](#legacy-self-hosting-with-zitadel-idp) below.
5858
</Note>
5959

6060
### Legacy Setup (Separate Containers)

0 commit comments

Comments
 (0)