Closed paul90 closed 2 years ago
I spotted this problem both when loading a page that added more than one site to the neighbourhood, and refreshing the browser when the neighbourhood had 2 or more sites.
I think the catch is going to be needed if there is something very wrong with a site. The sitemapRequestInflight
event is fired, and sitemapRequestInflight
unset, when a sitemap has loaded. So, by ignoring sites where the request hasn't completed there should be a something in the sitemap, and the catch will only happen when it doesn't have a length.
Ah. A condition that I hadn't considered. Thanks for explaining this. I'm happy to see it merged.
published as + wiki-client@0.23.5
The total number of pages gets recalculated triggered by the
new-neighbor-done
event. However, some neighbors might not be done yet so those will fail with a type error when trying to count the number of pages withsite.sitemap.length
.In this change any site that are still in flight,
sitemapRequestInflight
is stilltrue
, are ignored. They will eventually get included as they complete and fire their ownnew-neighbor-done
event.