From c106b8ecc85c418f09c480ceac665f961e9d686c Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 19 Sep 2022 11:02:50 +0800 Subject: [PATCH] chore(nc-gui): remove unnecessary ? operator --- packages/nc-gui/composables/useViewData.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/composables/useViewData.ts b/packages/nc-gui/composables/useViewData.ts index 6891f41b15..59cd214718 100644 --- a/packages/nc-gui/composables/useViewData.ts +++ b/packages/nc-gui/composables/useViewData.ts @@ -82,7 +82,7 @@ export function useViewData( const queryParams = computed(() => ({ offset: ((paginationData.value.page ?? 0) - 1) * (paginationData.value.pageSize ?? appInfoDefaultLimit), - limit: paginationData.value?.pageSize ?? appInfoDefaultLimit, + limit: paginationData.value.pageSize ?? appInfoDefaultLimit, where: where?.value ?? '', })) @@ -118,9 +118,9 @@ export function useViewData( // total records in the current table const count = paginationData.value?.totalRows ?? Infinity // the number of rows in a page - const size = paginationData.value?.pageSize ?? appInfoDefaultLimit + const size = paginationData.value.pageSize ?? appInfoDefaultLimit // the current page number - const currentPage = paginationData.value?.page ?? 1 + const currentPage = paginationData.value.page ?? 1 // the maximum possible page given the current count and the size const mxPage = Math.ceil(count / size) // calculate targetPage where 1 <= targetPage <= mxPage