Skip to content

Commit c88237a

Browse files
committed
Improve error message
1 parent 19d84a2 commit c88237a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

site/src/components/TemplateVersionEditor/FileDialog.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ export const CreateFileDialog: FC<{
2626
return
2727
}
2828
if (!isAllowedFile(pathValue)) {
29+
const extensions = allowedExtensions.join(", ")
2930
setError(
30-
`This is not an allowed extension. Valid extensions are: ${allowedExtensions.join(
31-
", ",
32-
)}.`,
31+
`This extension is not allowed. You only can create files with the following extensions: ${extensions}.`,
3332
)
3433
return
3534
}

0 commit comments

Comments
 (0)