abovefoldAlgorithm: wrap item selection
This commit is contained in:
parent
5749821b36
commit
ec225ea1c5
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ const abovefoldAlgorithm: PickAlgorithm = (items, iteration, opts: Opts) => {
|
|||
const insertIndex = Math.floor(rng() * opts.range[1] - opts.range[0]) + opts.range[0];
|
||||
|
||||
if (pageIndex === insertIndex) {
|
||||
return items[page];
|
||||
return items[page % items.length];
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue