Listing previous versions fails for some datasets
bug
Navigate to https://nextstrain.org/pathogens?filter=ncov (for example).
Click on one of the many "turn back the clock" links with an n= in several hundreds, e.g. ncov/gisaid/africa/1m's "every few days (n=455)". Note that it opens the previous versions modal as expected. Close the modal.
Click on one of the same "turn back the clock" links with a higher n=, e.g. ncov/gisaid/africa/2m's n=616 or …/6m's n=1119. Note that it crashes the list resources component with the error:
> Something isn't working! Error: \`Unknown error (thrown value was not an InternalError)\`
Reproducing this locally, I see the underlying error is:
> TypeError: can't access property Symbol.iterator, items is undefined
from inside d3 and implicates our code at:
https://github.com/nextstrain/nextstrain.org/blob/a1f44b894073e04e35ccad22a4cec9ecf653b73b/static-site/components/list-resources/modal_draw.js#L125
This points to `beeswarmData` being undefined, which makes sense as possible since it starts as undefined and may not ever be defined before the iterative sizing algorithm gives up:
https://github.com/nextstrain/nextstrain.org/blob/a1f44b894073e04e35ccad22a4cec9ecf653b73b/static-site/components/list-resources/modal_draw.js#L97-L119
2 条评论