Skip to content

Commit

Permalink
fix 0 being treated as falsy in param filters
Browse files Browse the repository at this point in the history
  • Loading branch information
BitPatty authored Oct 23, 2021
1 parent dc19a62 commit 7d7e175
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"main": "dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/param-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ImgProxyParamBuilder {
width,
height,
...[gravity?.type, gravity?.center?.x, gravity?.center?.y].filter(
(v) => !!v,
(v) => v != null,
),
].join(':'),
);
Expand Down Expand Up @@ -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(':'),
Expand Down

0 comments on commit 7d7e175

Please sign in to comment.