File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -273,9 +273,12 @@ watch(() => coreStore.resource?.resourceId, () => {
273273const PAGE_SIZE_OPTIONS = computed (() => {
274274 const array = coreStore .resource ?.options ?.listPageSizeOptions ;
275275
276- if (! array || array . length === 0 ) return undefined ;
276+ if (! Array . isArray ( array ) ) return undefined ;
277277
278- return array .map (size => ({ label: size .toString (), value: size }));
278+ return array .map ((size : number ) => ({
279+ label: size .toString (),
280+ value: size
281+ }));
279282});
280283
281284const pageSize = ref (DEFAULT_PAGE_SIZE );
@@ -450,8 +453,7 @@ async function init() {
450453 }
451454 if (route .query .pageSize ) {
452455 const parsedPageSize = parseInt (route .query .pageSize as string );
453- // Перевіряємо наявність опцій перед використанням .includes
454- if (PAGE_SIZE_OPTIONS .value && PAGE_SIZE_OPTIONS .value .some (o => o .value === parsedPageSize )) {
456+ if (PAGE_SIZE_OPTIONS .value && PAGE_SIZE_OPTIONS .value .some ((o : { value: number }) => o .value === parsedPageSize )) {
455457 pageSize .value = parsedPageSize ;
456458 }
457459 } else if (coreStore .resource ?.options ?.listPageSize ) {
You can’t perform that action at this time.
0 commit comments