Skip to content

Commit

Permalink
fix: removing redundant double quotes as JSON.stringify already adds …
Browse files Browse the repository at this point in the history
…them
  • Loading branch information
elitalpa committed Oct 28, 2024
1 parent 8d5571b commit c6d9003
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const buffer = Buffer.from(${JSON.stringify(
if (${isTwitter || isOpenGraph}) {
const fileSizeInMB = buffer.byteLength / 1024 / 1024
if (fileSizeInMB > ${fileSizeLimit}) {
throw new Error('File size for ${imgName} image "${JSON.stringify(resourcePath)}" exceeds ${fileSizeLimit}MB. ' +
throw new Error('File size for ${imgName} image ${JSON.stringify(resourcePath)} exceeds ${fileSizeLimit}MB. ' +
\`(Current: \${fileSizeInMB.toFixed(2)}MB)\n\` +
'Read more: https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image#image-files-jpg-png-gif'
)
Expand Down

0 comments on commit c6d9003

Please sign in to comment.