File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1237,7 +1237,7 @@ class ApiMethods {
12371237
12381238 getTemplateVersionPresets = async (
12391239 templateVersionId : string ,
1240- ) : Promise < TypesGen . Preset [ ] > => {
1240+ ) : Promise < TypesGen . Preset [ ] | null > => {
12411241 const response = await this . axios . get < TypesGen . Preset [ ] > (
12421242 `/api/v2/templateversions/${ templateVersionId } /presets` ,
12431243 ) ;
Original file line number Diff line number Diff line change @@ -610,7 +610,7 @@ export const data = {
610610 templateVersionId : string ,
611611 ) : Promise < Task > {
612612 const presets = await API . getTemplateVersionPresets ( templateVersionId ) ;
613- const defaultPreset = presets . find ( ( p ) => p . Default ) ;
613+ const defaultPreset = presets ? .find ( ( p ) => p . Default ) ;
614614 const workspace = await API . createWorkspace ( userId , {
615615 name : `task-${ generateWorkspaceName ( ) } ` ,
616616 template_version_id : templateVersionId ,
You can’t perform that action at this time.
0 commit comments