mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 13:51:53 +02:00
Merge pull request #734 from nunocoracao/722-getboundingclientrect-call-on-null-error-logged-on-pages-with-little-content
🐛 getBoundingClientRect() call on null error logged on pages with little content
This commit is contained in:
commit
49bf99641e
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ var getTargetAppearance = () => {
|
||||||
window.addEventListener("DOMContentLoaded", (event) => {
|
window.addEventListener("DOMContentLoaded", (event) => {
|
||||||
const scroller = document.getElementById("top-scroller");
|
const scroller = document.getElementById("top-scroller");
|
||||||
const footer = document.getElementById("site-footer");
|
const footer = document.getElementById("site-footer");
|
||||||
if(scroller.getBoundingClientRect().top > footer.getBoundingClientRect().top) {
|
if(scroller && footer && scroller.getBoundingClientRect().top > footer.getBoundingClientRect().top) {
|
||||||
scroller.hidden = true;
|
scroller.hidden = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue