Skip to content

Commit dbb9b85

Browse files
committed
fix h=undefined in parsed url
1 parent cfac4bf commit dbb9b85

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@delicious-simplicity/next-image-contentful-loader",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"repository": "https://github.com/delicious-simplicity/next-image-contentful-loader.git",
55
"author": "Devin Metivier <devinmetivier@gmail.com>",
66
"contributors": [

src/nextContentfulLoader.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export const contentfulLoader = (loaderProps: ImageLoaderProps, contentfulParams
6767
}
6868

6969
delete adjustedContentfulParams['ar'];
70+
if (typeof adjustedContentfulParams['h'] === 'undefined') delete adjustedContentfulParams['h'];
7071

7172
return `${loaderProps.src}?${new URLSearchParams(adjustedContentfulParams as { [key: string]: string }).toString()}`;
7273
};

0 commit comments

Comments
 (0)