Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
timonson committed Aug 20, 2023
1 parent e10ea6e commit 5158060
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions og_image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ function drawBackground(
}

function isImageFormat(format: string): format is ImageFormat {
console.log(imageFormats, format);
return imageFormats.includes(format as ImageFormat);
}

Expand Down Expand Up @@ -68,7 +67,6 @@ export async function createOgImage(request: Request): Promise<Uint8Array> {
let imageWidth = parseInt(url.searchParams.get("width") || "0");
let imageHeight = parseInt(url.searchParams.get("height") || "0");
const imageFormat = hasNoText ? "png" : parsedPathname.ext.slice(1);
console.log(parsedPathname, imageFormat, isImageFormat(imageFormat));
if (isImageFormat(imageFormat)) {
if (theme === "light" || theme === "dark") {
drawBackground(ctx, canvasSize, theme);
Expand Down

0 comments on commit 5158060

Please sign in to comment.