File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import {
25
25
RefComponentSuffix ,
26
26
upath ,
27
27
SwaggerParserOptions ,
28
+ isUndefined ,
28
29
} from '@orval/core' ;
29
30
import chalk from 'chalk' ;
30
31
import { InfoObject } from 'openapi3-ts' ;
@@ -356,8 +357,12 @@ const normalizeQueryOptions = (
356
357
}
357
358
358
359
return {
359
- ...( queryOptions . useQuery ? { useQuery : true } : { } ) ,
360
- ...( queryOptions . useInfinite ? { useInfinite : true } : { } ) ,
360
+ ...( ! isUndefined ( queryOptions . useQuery )
361
+ ? { useQuery : queryOptions . useQuery }
362
+ : { } ) ,
363
+ ...( ! isUndefined ( queryOptions . useInfinite )
364
+ ? { useInfinite : queryOptions . useInfinite }
365
+ : { } ) ,
361
366
...( queryOptions . useInfiniteQueryParam
362
367
? { useInfiniteQueryParam : queryOptions . useInfiniteQueryParam }
363
368
: { } ) ,
@@ -383,7 +388,9 @@ const normalizeQueryOptions = (
383
388
) ,
384
389
}
385
390
: { } ) ,
386
- ...( queryOptions . signal ? { signal : true } : { } ) ,
391
+ ...( ! isUndefined ( queryOptions . signal )
392
+ ? { signal : queryOptions . signal }
393
+ : { } ) ,
387
394
} ;
388
395
} ;
389
396
You can’t perform that action at this time.
1 commit comments
vercel[bot] commentedon Feb 10, 2023
Successfully deployed to the following URLs:
orval – ./
orval-anymaniax.vercel.app
www.orval.dev
orval-git-master-anymaniax.vercel.app
orval.vercel.app
orval.dev