Skip to content

Commit b7ce020

Browse files
committed
fix typing
1 parent 94abca9 commit b7ce020

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/src/pages/TemplateSettingsPage/TemplateSettingsForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const Language = {
2626
ttlMaxError: "Please enter a limit that is less than or equal to 168 hours (7 days).",
2727
descriptionMaxError: "Please enter a description that is less than or equal to 128 characters.",
2828
ttlHelperText: (
29-
ttl?: number,
29+
ttl: number,
3030
): string => `Workspaces created from this template will, by default, shut down ${ttl}
3131
hours after starting.`,
3232
}
@@ -173,7 +173,7 @@ export const TemplateSettingsForm: FC<TemplateSettingsForm> = ({
173173
variant="outlined"
174174
type="number"
175175
/>
176-
{!form.errors.max_ttl_ms && (
176+
{!form.errors.max_ttl_ms && form.values.max_ttl_ms && (
177177
<Typography variant="subtitle2">
178178
{Language.ttlHelperText(form.values.max_ttl_ms)}
179179
</Typography>

0 commit comments

Comments
 (0)