Skip to content

Commit

Permalink
fix(query): remove useless semi-colon and add where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
anymaniax committed Aug 2, 2022
1 parent 3344755 commit 486dceb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/generators/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ const getHookOptions = ({
value += ', request: requestOptions';
}

value += '} = options ?? {}';
value += '} = options ?? {};';

return value;
};
Expand Down Expand Up @@ -622,7 +622,7 @@ export const ${camel(
${
mutator?.isHook
? `const ${operationName} = use${pascal(operationName)}Hook()`
? `const ${operationName} = use${pascal(operationName)}Hook();`
: ''
}
Expand Down Expand Up @@ -804,7 +804,7 @@ const generateQueryHook = (
: mutator?.hasSecondArg
? ', request: requestOptions'
: ''
}} = options ?? {}`
}} = options ?? {};`
: ''
}
Expand All @@ -818,7 +818,7 @@ const generateQueryHook = (
const mutationFn: MutationFunction<Awaited<ReturnType<${dataType}>>, ${
definitions ? `{${definitions}}` : 'TVariables'
}> = (${properties ? 'props' : ''}) => {
${properties ? `const {${properties}} = props ?? {}` : ''};
${properties ? `const {${properties}} = props ?? {};` : ''}
return ${operationName}(${properties}${properties ? ',' : ''}${
isRequestOptions
Expand Down

0 comments on commit 486dceb

Please sign in to comment.