From 486dcebe89168947ab418f9b271b55564dc1ab14 Mon Sep 17 00:00:00 2001 From: anymaniax Date: Tue, 2 Aug 2022 17:21:55 +0200 Subject: [PATCH] fix(query): remove useless semi-colon and add where needed --- src/core/generators/query.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/generators/query.ts b/src/core/generators/query.ts index c97915cb3..db7c32f23 100644 --- a/src/core/generators/query.ts +++ b/src/core/generators/query.ts @@ -489,7 +489,7 @@ const getHookOptions = ({ value += ', request: requestOptions'; } - value += '} = options ?? {}'; + value += '} = options ?? {};'; return value; }; @@ -622,7 +622,7 @@ export const ${camel( ${ mutator?.isHook - ? `const ${operationName} = use${pascal(operationName)}Hook()` + ? `const ${operationName} = use${pascal(operationName)}Hook();` : '' } @@ -804,7 +804,7 @@ const generateQueryHook = ( : mutator?.hasSecondArg ? ', request: requestOptions' : '' - }} = options ?? {}` + }} = options ?? {};` : '' } @@ -818,7 +818,7 @@ const generateQueryHook = ( const mutationFn: MutationFunction>, ${ definitions ? `{${definitions}}` : 'TVariables' }> = (${properties ? 'props' : ''}) => { - ${properties ? `const {${properties}} = props ?? {}` : ''}; + ${properties ? `const {${properties}} = props ?? {};` : ''} return ${operationName}(${properties}${properties ? ',' : ''}${ isRequestOptions