From d99a39f08134ca16630dc74a4df747a52062078c Mon Sep 17 00:00:00 2001 From: tniezg Date: Mon, 31 Jan 2022 11:08:32 +0100 Subject: [PATCH] Fix the squashed form of products.show() method --- src/endpoints/Products.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/endpoints/Products.ts b/src/endpoints/Products.ts index a0e6c814..8c1cd86a 100644 --- a/src/endpoints/Products.ts +++ b/src/endpoints/Products.ts @@ -31,9 +31,9 @@ export default class Products extends Http { */ public async show(id: string, token: IToken, params: IProductsQuery): Promise public async show(...allArguments: any[]): Promise { - const [positionalId, positionalToken = {}, positionalParams = {}] = allArguments + const [idOrOptions, positionalToken = {}, positionalParams = {}] = allArguments const { id, token, params } = squashAndPreparePositionalArguments( - [{ id: positionalId }, positionalToken, positionalParams], + [typeof idOrOptions === 'object' ? idOrOptions : { id: idOrOptions }, positionalToken, positionalParams], ['id'] )