reverting changes in polish manually

This commit is contained in:
Andrew Gundersen 2022-01-20 11:39:39 -06:00
commit fb14847730
6 changed files with 60 additions and 20 deletions

View file

@ -7,11 +7,13 @@ const initScroll = (elementId) => {
}
const isBottom = () => {
return el.scrollHeight - el.clientHeight <= el.scrollTop + 1;
if (el) {
return el.scrollHeight - el.clientHeight <= el.scrollTop + 1;
}
}
const adjustScroll = () => {
if (isBottom()) {
if (el) {
el.scrollTo({
top: el.scrollHeight - el.clientHeight,
behavior: 'smooth'