Skip to content

Commit e14ad7d

Browse files
author
Alban Bailly
committed
bug and style fixes
1 parent 796de27 commit e14ad7d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/components/5_templates/api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ class apiPage extends React.Component {
3333
window.addEventListener("scroll", () => {
3434
const top = window.scrollY;
3535
const scrollButton = document.getElementById("back-to-top");
36-
if (top >= 50) {
36+
if (scrollButton && top >= 50) {
3737
scrollButton.classList.add("is-visible");
38-
} else {
38+
} else if (scrollButton) {
3939
scrollButton.classList.remove("is-visible");
40-
}
40+
} else;
4141
});
4242
}
4343

src/css/components/4_pages/api-page.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
.api-link {
7575
position: relative;
76-
line-height: 1.4;
76+
line-height: 1.1;
7777
}
7878

7979
.top-menu-anchor {
@@ -269,7 +269,7 @@
269269
}
270270

271271
.active-group .list-group li {
272-
@apply py-2;
272+
padding: 5px 0;
273273
}
274274
}
275275

src/pages/api/v4.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ class APIDocs extends React.Component {
3232
window.addEventListener("scroll", () => {
3333
const top = window.scrollY;
3434
const scrollButton = document.getElementById("back-to-top");
35-
if (top >= 50) {
35+
if (scrollButton && top >= 50) {
3636
scrollButton.classList.add("is-visible");
37-
} else {
37+
} else if (scrollButton) {
3838
scrollButton.classList.remove("is-visible");
39-
}
39+
} else;
4040
});
4141
}
4242

0 commit comments

Comments
 (0)