Skip to content

Commit a5520bb

Browse files
committed
Fix format with prettier
1 parent eebebeb commit a5520bb

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/utils/images-optimization.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,12 @@ export const astroAsseetsOptimizer: ImagesOptimizer = async (
225225

226226
return Promise.all(
227227
breakpoints.map(async (w: number) => {
228-
const result = (await getImage({ src: image, width: w, inferSize: true, ...(format ? { format: format } : {}) }));
228+
const result = await getImage({ src: image, width: w, inferSize: true, ...(format ? { format: format } : {}) });
229229

230230
return {
231231
src: result?.src,
232232
width: result?.attributes?.width ?? w,
233-
height: result?.attributes?.height
233+
height: result?.attributes?.height,
234234
};
235235
})
236236
);

src/utils/images.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ export const adaptOpenGraphImages = async (
8484
typeof resolvedImage !== 'string' && resolvedImage?.width <= defaultWidth
8585
? [resolvedImage?.width, resolvedImage?.height]
8686
: [defaultWidth, defaultHeight];
87-
_image = (await astroAsseetsOptimizer(resolvedImage, [dimensions[0]], dimensions[0], dimensions[1], 'jpg'))[0];
87+
_image = (
88+
await astroAsseetsOptimizer(resolvedImage, [dimensions[0]], dimensions[0], dimensions[1], 'jpg')
89+
)[0];
8890
}
8991

9092
if (typeof _image === 'object') {

0 commit comments

Comments
 (0)