mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-16 15:44:49 +00:00
floor the skip query param
This commit is contained in:
parent
13e3c1a85d
commit
7ba0e35657
1 changed files with 7 additions and 0 deletions
|
|
@ -14,6 +14,13 @@ const useCatalog = (urlParams, queryParams) => {
|
|||
const addonTransportUrl = typeof urlParams.addonTransportUrl === 'string' ? urlParams.addonTransportUrl : DEFAULT_ADDON_TRANSPORT_URL;
|
||||
const catalogId = typeof urlParams.catalogId === 'string' ? urlParams.catalogId : DEFAULT_CATALOG_ID;
|
||||
const type = typeof urlParams.type === 'string' ? urlParams.type : DEFAULT_TYPE;
|
||||
queryParams = new URLSearchParams(queryParams);
|
||||
if (queryParams.has('skip')) {
|
||||
const skip = parseInt(queryParams.get('skip'));
|
||||
if (!isNaN(skip)) {
|
||||
queryParams.set('skip', Math.floor(skip / PAGE_SIZE) * PAGE_SIZE);
|
||||
}
|
||||
}
|
||||
const onNewModel = () => {
|
||||
const state = core.getState();
|
||||
const navigateWithLoad = (load) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue