From 358572d9e76f4cd22bfcb09c092a1eaf3a31f005 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sat, 4 Nov 2023 10:40:06 +0100 Subject: infra(typescript-eslint): strict-type-checked (#2467) --- src/modules/image/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/modules/image') 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 += '&'; } -- cgit v1.2.3