Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 10c51f9

Browse files
committed
fix: documentation page
1 parent d130a25 commit 10c51f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class Docs extends Util.mixin(BindMixin) {
8787
this.viewportHeight = 0;
8888

8989
this.pageRef = React.createRef();
90-
this.nodeRefs.sectionRefs.pageHeader = React.createRef();
90+
this.nodeRefs.pageHeader = React.createRef();
9191
navigationItems.forEach(
9292
({ id }) => (this.nodeRefs.sectionRefs[id] = React.createRef())
9393
);
@@ -104,7 +104,7 @@ class Docs extends Util.mixin(BindMixin) {
104104
handleNavigationClick(id) {
105105
const sectionPosition = this.sectionScrollPositions[id];
106106

107-
if (this.pageRef && sectionPosition != null) {
107+
if (this.pageRef.current && sectionPosition != null) {
108108
this.pageRef.current.scrollTop = sectionPosition;
109109
}
110110
}
@@ -127,7 +127,7 @@ class Docs extends Util.mixin(BindMixin) {
127127
}
128128

129129
calculateNodePositions() {
130-
const pageHeaderHeight = this.nodeRefs.pageHeader.offsetHeight;
130+
const pageHeaderHeight = this.nodeRefs.pageHeader.current.offsetHeight;
131131
this.viewportHeight = DOMUtil.getViewportHeight();
132132

133133
Object.keys(this.nodeRefs.sectionRefs).forEach(ref => {

0 commit comments

Comments
 (0)