Skip to content

Commit 59e057f

Browse files
committed
remove let, but shout-out Jacob
1 parent d8aad39 commit 59e057f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

website/app/routes/img.$.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ function getFilePath(
3737
return `data/images/${type}/v1-${fileName}-${widthInfo}-${heightInfo}-${fit}.webp`;
3838
}
3939

40+
/**
41+
* Inspired by Jacob Eybey's gist: https://gist.github.com/jacob-ebey/3a37a86307de9ef22f47aae2e593b56f
42+
*/
4043
export async function loader({ request }: LoaderFunctionArgs) {
4144
const url = new URL(request.url);
4245

@@ -92,7 +95,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
9295
}
9396
const arrayBuffer = await res.arrayBuffer();
9497

95-
let sharpInstance = sharp(arrayBuffer);
98+
const sharpInstance = sharp(arrayBuffer);
9699
sharpInstance.on('error', (error) => {
97100
console.error(error);
98101
captureException(error);

0 commit comments

Comments
 (0)