Resolves a corner-case issue with the previous fix in #5632, where rendering an empty list (items.length===0), setting the initialCount to 0, and then attempting to render a list with items.length > 0 could cause the list to be stuck in an unrendered state.
Note that any falsey value for initialCount (including 0) is interpreted as "chunking disabled". This is consistent with 1.x logic, and follows from the logic of "starting chunking by rendering zero items" doesn't really make sense.
Also took the opportunity while adding a new test to refactor the chunking tests to use async/await for better readability.
Resolves a corner-case issue with the previous fix in #5632, where rendering an empty list (
items.length===0
), setting theinitialCount
to0
, and then attempting to render a list withitems.length > 0
could cause the list to be stuck in an unrendered state.Note that any falsey value for
initialCount
(including0
) is interpreted as "chunking disabled". This is consistent with 1.x logic, and follows from the logic of "starting chunking by rendering zero items" doesn't really make sense.Also took the opportunity while adding a new test to refactor the chunking tests to use async/await for better readability.
Reference Issue
Fixes #5631