File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/components/infinite-scroll Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ export class InfiniteScroll {
256
256
let distanceFromInfinite : number ;
257
257
258
258
if ( this . _position === POSITION_BOTTOM ) {
259
- distanceFromInfinite = ( ( d . scrollHeight - infiniteHeight ) - d . scrollTop ) - height - threshold ;
259
+ distanceFromInfinite = d . scrollHeight - infiniteHeight - d . scrollTop - height - threshold ;
260
260
} else {
261
261
assert ( this . _position === POSITION_TOP , '_position should be top' ) ;
262
262
distanceFromInfinite = d . scrollTop - infiniteHeight - threshold ;
@@ -289,6 +289,10 @@ export class InfiniteScroll {
289
289
* to `enabled`.
290
290
*/
291
291
complete ( ) {
292
+ if ( this . state !== STATE_LOADING ) {
293
+ return ;
294
+ }
295
+
292
296
if ( this . _position === POSITION_BOTTOM ) {
293
297
this . state = STATE_ENABLED ;
294
298
return ;
You can’t perform that action at this time.
0 commit comments