fix(clinet): 誤字によりスクロールイベントリスナが解除されていなかったのを修正

This commit is contained in:
syuilo 2020-08-19 17:51:31 +09:00
parent 0ace009a54
commit c54d5e7040

View file

@ -20,7 +20,7 @@ export function onScrollTop(el: Element, cb) {
const pos = getScrollPosition(el);
if (pos === 0) {
cb();
container.removeEventListener('scroll', onscroll);
container.removeEventListener('scroll', onScroll);
}
};
container.addEventListener('scroll', onScroll, { passive: true });
@ -33,7 +33,7 @@ export function onScrollBottom(el: Element, cb) {
const pos = getScrollPosition(el);
if (pos + el.clientHeight > el.scrollHeight - 1) {
cb();
container.removeEventListener('scroll', onscroll);
container.removeEventListener('scroll', onScroll);
}
};
container.addEventListener('scroll', onScroll, { passive: true });