Skip to content

Commit

Permalink
Merge pull request #381 from andreia-oca/andreia-oca/fix-truthy-expre…
Browse files Browse the repository at this point in the history
…ssion

Fix TypeScript Error in window.prompt Call in Codeblock Component
  • Loading branch information
miurla authored Dec 24, 2024
2 parents af46e3b + 064e66b commit 4eb2e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/ui/codeblock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const CodeBlock: FC<Props> = memo(({ language, value }) => {
}
const fileExtension = programmingLanguages[language] || '.file'
const suggestedFileName = `file-${generateId()}${fileExtension}`
const fileName = window.prompt('Enter file name' || '', suggestedFileName)
const fileName = window.prompt('Enter file name', suggestedFileName)

if (!fileName) {
// User pressed cancel on prompt.
Expand Down

0 comments on commit 4eb2e80

Please sign in to comment.