fix once
This commit is contained in:
parent
8913c751f0
commit
af2603ef8a
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ export function onScrollTop(el: HTMLElement, cb: Function, asobi: number = 1, on
|
|||
// とりあえず評価してみる
|
||||
if (isTopVisible(el)) {
|
||||
cb();
|
||||
return null;
|
||||
if (once) return null;
|
||||
}
|
||||
|
||||
const container = getScrollContainer(el) || window;
|
||||
|
@ -53,7 +53,7 @@ export function onScrollBottom(el: HTMLElement, cb: Function, asobi: number = 1,
|
|||
// とりあえず評価してみる
|
||||
if (isBottomVisible(el, asobi, container)) {
|
||||
cb();
|
||||
return null;
|
||||
if (once) return null;
|
||||
}
|
||||
|
||||
const containerOrWindow = container || window;
|
||||
|
|
Loading…
Reference in a new issue