diff options
| author | ST-DDT <[email protected]> | 2023-11-04 10:40:06 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-04 09:40:06 +0000 |
| commit | 358572d9e76f4cd22bfcb09c092a1eaf3a31f005 (patch) | |
| tree | 836d9b14d2c7e338610dc36073e799a7723af8c8 /src/modules/image | |
| parent | 22003bbac9518befeaacfc75c9360a273f0ea6b4 (diff) | |
| download | faker-358572d9e76f4cd22bfcb09c092a1eaf3a31f005.tar.xz faker-358572d9e76f4cd22bfcb09c092a1eaf3a31f005.zip | |
infra(typescript-eslint): strict-type-checked (#2467)
Diffstat (limited to 'src/modules/image')
| -rw-r--r-- | src/modules/image/index.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/image/index.ts b/src/modules/image/index.ts index a93f181e..b1c9c692 100644 --- a/src/modules/image/index.ts +++ b/src/modules/image/index.ts @@ -232,17 +232,16 @@ export class ImageModule { length: { min: 5, max: 10 }, })}/${width}/${height}`; - const hasValidGrayscale = grayscale === true; const hasValidBlur = typeof blur === 'number' && blur >= 1 && blur <= 10; - if (hasValidGrayscale || hasValidBlur) { + if (grayscale || hasValidBlur) { url += '?'; - if (hasValidGrayscale) { + if (grayscale) { url += `grayscale`; } - if (hasValidGrayscale && hasValidBlur) { + if (grayscale && hasValidBlur) { url += '&'; } |
