File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ export async function initClaspInstance(options: InitOptions): Promise<Clasp> {
131131 project : {
132132 scriptId : config . scriptId ,
133133 projectId : config . projectId ,
134- parentId : config . parentId ,
134+ parentId : firstValue ( config . parentId ) ,
135135 } ,
136136 } ) ;
137137}
@@ -245,3 +245,10 @@ async function hasReadAccess(path: string): Promise<boolean> {
245245 }
246246 return true ;
247247}
248+
249+ function firstValue < T > ( values : T | T [ ] | undefined ) : T | undefined {
250+ if ( Array . isArray ( values ) && values . length > 0 ) {
251+ return values [ 0 ] ;
252+ }
253+ return values as T | undefined ;
254+ }
Original file line number Diff line number Diff line change @@ -316,6 +316,7 @@ export class Project {
316316 const settings = {
317317 scriptId : this . options . project . scriptId ,
318318 rootDir : srcDir ,
319+ parentId : this . options . project . parentId ,
319320 projectId : this . options . project . projectId ,
320321 scriptExtensions : this . options . files . fileExtensions [ 'SERVER_JS' ] ,
321322 htmlExtensions : this . options . files . fileExtensions [ 'HTML' ] ,
You can’t perform that action at this time.
0 commit comments