Skip to content

Commit e3b490d

Browse files
committed
fix: ensure imports are cleared on each run
1 parent 46126fb commit e3b490d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/generateHooks.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const getParamsInPath = (path: string) => {
2929
return output;
3030
};
3131

32-
export const imports: string[] = [];
32+
export let imports: string[] = [];
3333

3434
/**
3535
* Generate a react-query component from openapi operation specs
@@ -244,6 +244,7 @@ export const createHook = ({
244244
return createQuery();
245245
};
246246

247+
imports = [];
247248
output += createQueryHooks(!requestBodyComponent && !paramsInPath.length && !queryParam && !headerParam);
248249

249250
const generateProps = (props: ParameterObject[]) => {

0 commit comments

Comments
 (0)