Skip to content
Snippets Groups Projects
Commit 210db7fa authored by Kristof De Langhe's avatar Kristof De Langhe
Browse files

68346: Fixed loading multiple pages with unloaded inbetween

parent b987a3d7
No related branches found
No related tags found
No related merge requests found
......@@ -522,9 +522,14 @@ function addOrderToPages(initialPages: OrderPage[], order: string[], pageSize: n
result.push(orderPage);
} else {
// The page we're trying to add is at least one page ahead of the list, fill the list with empty pages before adding the page.
const emptyOrderPage: OrderPage = { order: [] };
emptyOrderPage.order.fill(undefined, 0, pageSize);
result.fill(emptyOrderPage, result.length, page - 1);
const emptyOrder = [];
for (let i = 0; i < pageSize; i++) {
emptyOrder.push(undefined);
}
const emptyOrderPage: OrderPage = { order: emptyOrder };
for (let i = result.length; i < page; i++) {
result.push(emptyOrderPage);
}
result.push(orderPage);
}
return result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment