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 {
1237
1237
1238
1238
getTemplateVersionPresets = async (
1239
1239
templateVersionId : string ,
1240
- ) : Promise < TypesGen . Preset [ ] > => {
1240
+ ) : Promise < TypesGen . Preset [ ] | null > => {
1241
1241
const response = await this . axios . get < TypesGen . Preset [ ] > (
1242
1242
`/api/v2/templateversions/${ templateVersionId } /presets` ,
1243
1243
) ;
Original file line number Diff line number Diff line change @@ -610,7 +610,7 @@ export const data = {
610
610
templateVersionId : string ,
611
611
) : Promise < Task > {
612
612
const presets = await API . getTemplateVersionPresets ( templateVersionId ) ;
613
- const defaultPreset = presets . find ( ( p ) => p . Default ) ;
613
+ const defaultPreset = presets ? .find ( ( p ) => p . Default ) ;
614
614
const workspace = await API . createWorkspace ( userId , {
615
615
name : `task-${ generateWorkspaceName ( ) } ` ,
616
616
template_version_id : templateVersionId ,
You can’t perform that action at this time.
0 commit comments