diff --git a/packages/headless/src/controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.ts b/packages/headless/src/controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.ts index 1822d547246..1830c78c28d 100644 --- a/packages/headless/src/controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.ts +++ b/packages/headless/src/controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.ts @@ -24,10 +24,10 @@ export type {Pagination, PaginationProps, PaginationState}; */ export function definePagination< TOptions extends ControllerDefinitionOption | undefined, ->(props?: PaginationProps, options?: TOptions) { - ensureAtLeastOneSolutionType(options); +>(props?: PaginationProps & TOptions) { + ensureAtLeastOneSolutionType(props); return { - ...options, + ...props, build: (engine, solutionType) => solutionType === SolutionType.listing ? buildProductListing(engine).pagination(props) diff --git a/packages/headless/src/controllers/commerce/core/sort/headless-core-commerce-sort.ssr.ts b/packages/headless/src/controllers/commerce/core/sort/headless-core-commerce-sort.ssr.ts index 501c93c9efe..9f12e24db2e 100644 --- a/packages/headless/src/controllers/commerce/core/sort/headless-core-commerce-sort.ssr.ts +++ b/packages/headless/src/controllers/commerce/core/sort/headless-core-commerce-sort.ssr.ts @@ -20,10 +20,10 @@ export type {Sort, SortProps, SortState}; */ export function defineSort< TOptions extends ControllerDefinitionOption | undefined, ->(props?: SortProps, options?: TOptions) { - ensureAtLeastOneSolutionType(options); +>(props?: SortProps & TOptions) { + ensureAtLeastOneSolutionType(props); return { - ...options, + ...props, build: (engine, solutionType) => solutionType === SolutionType.listing ? buildProductListing(engine).sort(props)