Skip to content

fix: use the default value for a rich parameter if unset #6715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: use the default value for a rich parameter if unset
This fixes an error thrown on the workspace settings page when
a new parameter is added and the workspace hasn't been built yet.
  • Loading branch information
kylecarbs committed Mar 21, 2023
commit 434b912c357f4cb1160d4b064d7a75b33e91ba15
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export const WorkspaceSettingsForm: FC<{
(p) => p.name === parameter.name,
)
if (!buildParameter) {
throw new Error("Missing build parameter for " + parameter.name)
return {
name: parameter.name,
value: parameter.default_value,
}
}
return buildParameter
}),
Expand Down