File tree 2 files changed +7
-10
lines changed
2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,10 @@ class Pages extends LitElement {
283
283
return ;
284
284
}
285
285
286
+ if ( ! json . pages . length ) {
287
+ this . skipScrollMore = true ;
288
+ }
289
+
286
290
const knownPages = new Set ( ) ;
287
291
this . filteredPages . forEach ( ( x ) => knownPages . add ( x . id ) ) ;
288
292
@@ -334,11 +338,7 @@ class Pages extends LitElement {
334
338
this . filteredPages = [ ...this . filteredPages , ...newPages ] ;
335
339
}
336
340
337
- if ( json . total ) {
338
- this . totalPages = json . total ;
339
- } else {
340
- this . totalPages = this . filteredPages . length ;
341
- }
341
+ this . totalPages = this . filteredPages . length ;
342
342
}
343
343
344
344
async filterCurated ( ) {
@@ -1336,10 +1336,7 @@ class Pages extends LitElement {
1336
1336
element . scrollHeight - element . scrollTop - element . clientHeight ;
1337
1337
if ( diff < 40 && ! this . skipScrollMore ) {
1338
1338
this . skipScrollMore = true ;
1339
- if (
1340
- this . dynamicPagesQuery &&
1341
- this . filteredPages . length < this . totalPages
1342
- ) {
1339
+ if ( this . dynamicPagesQuery ) {
1343
1340
this . dynamicPageCount += 1 ;
1344
1341
await this . addDynamicPages ( ) ;
1345
1342
}
You can’t perform that action at this time.
0 commit comments