diff --git a/package-lock.json b/package-lock.json index 0d9c1cb..e2d96de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bitpatty/next-image-s3-imgproxy-loader", - "version": "0.3.0", + "version": "0.3.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@bitpatty/next-image-s3-imgproxy-loader", - "version": "0.3.0", + "version": "0.3.1", "license": "MIT", "devDependencies": { "@types/react": "^17.0.27", diff --git a/package.json b/package.json index 4053d53..9d80920 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bitpatty/next-image-s3-imgproxy-loader", - "version": "0.3.0", + "version": "0.3.1", "description": "imgproxy S3 extension for next/image", "author": "Matteias Collet ", "main": "dist/index.js", diff --git a/src/param-builder.ts b/src/param-builder.ts index a4b6227..4997d6b 100644 --- a/src/param-builder.ts +++ b/src/param-builder.ts @@ -39,7 +39,7 @@ class ImgProxyParamBuilder { width, height, ...[gravity?.type, gravity?.center?.x, gravity?.center?.y].filter( - (v) => !!v, + (v) => v != null, ), ].join(':'), ); @@ -75,7 +75,7 @@ class ImgProxyParamBuilder { !!enlarge, !!extend, ...[gravity?.type, gravity?.center?.x, gravity?.center?.y].filter( - (v) => !!v, + (v) => v != null, ), ].join(':') : ['resize', type ?? 'fit'].join(':'),