guard against next page not being found in AP feed

This commit is contained in:
Drew Harwell 2019-11-22 10:46:46 -05:00
parent f4b6ab38f3
commit 06ece16d62
2 changed files with 6 additions and 8 deletions

View file

@ -204,6 +204,7 @@ async function itemsForFeed(opts,user,feed) {
function getNextPage(opts,user,feed){
//based on feed.next
if (!feed.next){return null}
// take feed.next, uriencode it, then take user url, then take options.mastofeedUrl
var base = opts.mastofeedUrl.slice(0,opts.mastofeedUrl.indexOf('?'));

View file

@ -92,15 +92,12 @@
<a class="date" href="<%= item.permalink %>"><%= item.stringDate %></a>
</div>
<% }); %>
<% if (nextPageLink) %>
<div class="item hidden">
<a class="hacky_link" href="<%- nextPageLink %>">More</a>
</div>
<% %>
</div> <!-- end item container -->
<div class="pagination">
<a class="button" href="<%- nextPageLink %>">Load More</a>
</div>
<% if (nextPageLink){ %>
<div class="pagination">
<a class="button hacky_link" href="<%- nextPageLink %>">Load More</a>
</div>
<% } %>
<% if ( isIndex ){ %>
<script src="/infinite-scroll.js"></script>